Struct ConfigRelativePath
pub struct ConfigRelativePath(Value<String>);Expand description
Use with the get API to fetch a string that will be converted to a
PathBuf. Relative paths are converted to absolute paths based on the
location of the config file.
Tuple Fields§
§0: Value<String>Implementations§
Trait Implementations§
§impl Clone for ConfigRelativePath
impl Clone for ConfigRelativePath
§fn clone(&self) -> ConfigRelativePath
fn clone(&self) -> ConfigRelativePath
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ConfigRelativePathResolveExt for ConfigRelativePath
impl ConfigRelativePathResolveExt for ConfigRelativePath
Source§fn resolve_path(&self, gctx: &GlobalContext) -> PathBuf
fn resolve_path(&self, gctx: &GlobalContext) -> PathBuf
Resolves this configuration-relative path to an absolute path. Read more
Source§fn resolve_templated_path(
&self,
gctx: &GlobalContext,
replacements: impl IntoIterator<Item = (impl AsRef<str>, impl AsRef<str>)>,
) -> Result<PathBuf, ResolveTemplateError>
fn resolve_templated_path( &self, gctx: &GlobalContext, replacements: impl IntoIterator<Item = (impl AsRef<str>, impl AsRef<str>)>, ) -> Result<PathBuf, ResolveTemplateError>
Same as
Self::resolve_path but will make string replacements
before resolving the path. Read moreSource§fn resolve_program(&self, gctx: &GlobalContext) -> PathBuf
fn resolve_program(&self, gctx: &GlobalContext) -> PathBuf
Resolves this configuration-relative path to either an absolute path or
something appropriate to execute from
PATH. Read more§impl Debug for ConfigRelativePath
impl Debug for ConfigRelativePath
§impl<'de> Deserialize<'de> for ConfigRelativePath
impl<'de> Deserialize<'de> for ConfigRelativePath
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ConfigRelativePath, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ConfigRelativePath, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl PartialEq for ConfigRelativePath
impl PartialEq for ConfigRelativePath
Source§impl ResolveToPath for ConfigRelativePath
impl ResolveToPath for ConfigRelativePath
fn resolve(&self, gctx: &GlobalContext) -> PathBuf
impl StructuralPartialEq for ConfigRelativePath
Auto Trait Implementations§
impl Forget for ConfigRelativePath
impl Freeze for ConfigRelativePath
impl Move for ConfigRelativePath
impl RefUnwindSafe for ConfigRelativePath
impl Send for ConfigRelativePath
impl Sync for ConfigRelativePath
impl Unpin for ConfigRelativePath
impl UnsafeUnpin for ConfigRelativePath
impl UnwindSafe for ConfigRelativePath
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 56 bytes