INNER CODE UNIT · Rust
set_source
killercup/cargo-edit · src/dependency.rs:58
pub fn set_source(mut self, source: impl Into<Source>) -> Self {
self.source = Some(source.into());
self
}
/// Set the available features of the dependency to a given vec
pub fn set_available_features(
mut self,
available_features: BTreeMap<String, Vec<String>>,
) -> Self {
self.available_features = available_features;
self
}
/// Set whether the dependency is optional
#[allow(dead_code)]
pub fn set_optional(mut self, opt: bool) -> Self {
self.optional = Some(opt);