Struct despatma_lib::AnnotatedType
source · pub struct AnnotatedType<T = Type> {
pub attrs: OptionsAttribute,
pub inner_type: T,
}Expand description
Holds a type that is optionally annotated with key-value options.
An acceptable stream will have the following form:
#[option1 = value1, option2 = value2]
SomeTypeThe outer attribute (hash part) is optional.
SomeType will be parsed to T.
Fields§
§attrs: OptionsAttribute§inner_type: TTrait Implementations§
source§impl<T: Parse> Parse for AnnotatedType<T>
impl<T: Parse> Parse for AnnotatedType<T>
Make AnnotatedType parsable from token stream
fn parse(input: ParseStream<'_>) -> Result<Self>
Auto Trait Implementations§
impl<T> Freeze for AnnotatedType<T>where
T: Freeze,
impl<T> RefUnwindSafe for AnnotatedType<T>where
T: RefUnwindSafe,
impl<T = Type> !Send for AnnotatedType<T>
impl<T = Type> !Sync for AnnotatedType<T>
impl<T> Unpin for AnnotatedType<T>where
T: Unpin,
impl<T> UnwindSafe for AnnotatedType<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