Type Alias cargo::util::toml::MaybeWorkspaceDependency
source · type MaybeWorkspaceDependency = MaybeWorkspace<TomlDependency, TomlWorkspaceDependency>;
Aliased Type§
enum MaybeWorkspaceDependency {
Defined(TomlDependency<String>),
Workspace(TomlWorkspaceDependency),
}
Variants§
Defined(TomlDependency<String>)
The “defined” type, or the type that that is used when not inheriting from a workspace.
Workspace(TomlWorkspaceDependency)
The type when inheriting from a workspace.
Implementations§
source§impl<T, W: WorkspaceInherit> MaybeWorkspace<T, W>
impl<T, W: WorkspaceInherit> MaybeWorkspace<T, W>
fn resolve<'a>( self, label: &str, get_ws_inheritable: impl FnOnce() -> CargoResult<T> ) -> CargoResult<T>
fn resolve_with_self<'a>( self, label: &str, get_ws_inheritable: impl FnOnce(&W) -> CargoResult<T> ) -> CargoResult<T>
fn as_defined(&self) -> Option<&T>
source§impl MaybeWorkspace<TomlDependency, TomlWorkspaceDependency>
impl MaybeWorkspace<TomlDependency, TomlWorkspaceDependency>
fn unused_keys(&self) -> Vec<String>
Trait Implementations§
source§impl<T: Clone, W: Clone + WorkspaceInherit> Clone for MaybeWorkspace<T, W>
impl<T: Clone, W: Clone + WorkspaceInherit> Clone for MaybeWorkspace<T, W>
source§fn clone(&self) -> MaybeWorkspace<T, W>
fn clone(&self) -> MaybeWorkspace<T, W>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<T: Debug, W: Debug + WorkspaceInherit> Debug for MaybeWorkspace<T, W>
impl<T: Debug, W: Debug + WorkspaceInherit> Debug for MaybeWorkspace<T, W>
source§impl<'de> Deserialize<'de> for MaybeWorkspace<TomlDependency, TomlWorkspaceDependency>
impl<'de> Deserialize<'de> for MaybeWorkspace<TomlDependency, TomlWorkspaceDependency>
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
source§impl<T, W> Serialize for MaybeWorkspace<T, W>where
T: Serialize,
W: Serialize + WorkspaceInherit,
impl<T, W> Serialize for MaybeWorkspace<T, W>where T: Serialize, W: Serialize + WorkspaceInherit,
impl<T: Copy, W: Copy + WorkspaceInherit> Copy for MaybeWorkspace<T, W>
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: 320 bytes
Size for each variant:
Defined
: 320 bytesWorkspace
: 56 bytes