pub enum InheritableField<T> {
Value(T),
Inherit(TomlInheritedField),
}
Expand description
An enum that allows for inheriting keys from a workspace in a Cargo.toml.
Variants§
Value(T)
The type that is used when not inheriting from a workspace.
Inherit(TomlInheritedField)
The type when inheriting from a workspace.
Implementations§
source§impl<T> InheritableField<T>
impl<T> InheritableField<T>
pub fn normalized(&self) -> Result<&T, UnresolvedError>
pub fn as_value(&self) -> Option<&T>
Trait Implementations§
source§impl<T: Clone> Clone for InheritableField<T>
impl<T: Clone> Clone for InheritableField<T>
source§fn clone(&self) -> InheritableField<T>
fn clone(&self) -> InheritableField<T>
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> Debug for InheritableField<T>
impl<T: Debug> Debug for InheritableField<T>
source§impl<T> Serialize for InheritableField<T>where
T: Serialize,
impl<T> Serialize for InheritableField<T>where
T: Serialize,
impl<T: Copy> Copy for InheritableField<T>
Auto Trait Implementations§
impl<T> Freeze for InheritableField<T>where
T: Freeze,
impl<T> RefUnwindSafe for InheritableField<T>where
T: RefUnwindSafe,
impl<T> Send for InheritableField<T>where
T: Send,
impl<T> Sync for InheritableField<T>where
T: Sync,
impl<T> Unpin for InheritableField<T>where
T: Unpin,
impl<T> UnwindSafe for InheritableField<T>where
T: 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
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.