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§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.