# 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>

source

#### fn resolve<'a>( self, label: &str, get_ws_inheritable: impl FnOnce() -> CargoResult<T> ) -> CargoResult<T>

source

#### fn resolve_with_self<'a>( self, label: &str, get_ws_inheritable: impl FnOnce(&W) -> CargoResult<T> ) -> CargoResult<T>

source

#### fn as_defined(&self) -> Option<&T>

source§

### impl MaybeWorkspace<TomlDependency, TomlWorkspaceDependency>

source

#### fn unused_keys(&self) -> Vec<String>

## Trait Implementations§

source§

### impl<T: Clone, W: Clone + WorkspaceInherit> Clone for MaybeWorkspace<T, W>

source§

#### 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)

Performs copy-assignment from `source`. Read more
source§

### impl<T: Debug, W: Debug + WorkspaceInherit> Debug for MaybeWorkspace<T, W>

source§

#### fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

### impl<'de> Deserialize<'de> for MaybeWorkspace<TomlDependency, TomlWorkspaceDependency>

source§

#### 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,

source§

#### fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

### 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 bytes
- `Workspace`: 56 bytes