pub struct DetailedIncludeConfig {
pub path: ConfigParentRelativePath,
pub optional: bool,
}Expand description
Represents a config-include value in the configuration.
Fields§
§path: ConfigParentRelativePath§optional: boolWhether this include is optional (missing files are silently ignored)
Implementations§
Source§impl DetailedIncludeConfig
impl DetailedIncludeConfig
Sourcepub fn resolve_path(&self, current_dir: &Path) -> Option<PathBuf>
pub fn resolve_path(&self, current_dir: &Path) -> Option<PathBuf>
Resolves the absolute path for this include.
For file based include,
it is relative to parent directory of the config file includes it.
For example, if .cargo/config.toml has a include = “foo.toml”, Cargo will load .cargo/foo.toml`.
For CLI based include (e.g., --config 'include = "foo.toml"'),
it is relative to the current working directory.
Returns None if this is an optional include and the file doesn’t exist.
Otherwise returns Some(PathBuf) with the absolute path.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DetailedIncludeConfig
impl<'de> Deserialize<'de> for DetailedIncludeConfig
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>,
Auto Trait Implementations§
impl Forget for DetailedIncludeConfig
impl Freeze for DetailedIncludeConfig
impl Move for DetailedIncludeConfig
impl RefUnwindSafe for DetailedIncludeConfig
impl Send for DetailedIncludeConfigwhere
RawVecInner: Send,
impl Sync for DetailedIncludeConfigwhere
RawVecInner: Sync,
impl Unpin for DetailedIncludeConfig
impl UnsafeUnpin for DetailedIncludeConfig
impl UnwindSafe for DetailedIncludeConfigwhere
RawVecInner: UnwindSafe,
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
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> ⓘ
§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>
fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>
§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: 72 bytes