pub enum EnvOption {
String(String),
Value {
value: String,
force: bool,
relative: bool,
},
}Expand description
Serializable environment variable in cargo config, configurable as per https://doc.rust-lang.org/cargo/reference/config.html#env,
Variants§
Implementations§
Source§impl EnvOption
impl EnvOption
Sourcepub fn resolve_value(
&self,
config_parent: impl AsRef<Path>,
) -> Result<Cow<'_, str>, EnvError>
pub fn resolve_value( &self, config_parent: impl AsRef<Path>, ) -> Result<Cow<'_, str>, EnvError>
Retrieve the value and canonicalize it relative to config_parent when EnvOption::Value::relative is set.
config_parent is the directory containing .cargo/config.toml where this was parsed from.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for EnvOption
impl<'de> Deserialize<'de> for EnvOption
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for EnvOption
impl StructuralPartialEq for EnvOption
Auto Trait Implementations§
impl Freeze for EnvOption
impl RefUnwindSafe for EnvOption
impl Send for EnvOption
impl Sync for EnvOption
impl Unpin for EnvOption
impl UnwindSafe for EnvOption
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more