pub(crate) enum FieldConversion {
Empty(Empty),
Skip(Skip),
Forward(Forward),
Types(Types),
}Expand description
Representation of an attribute, specifying which conversions should be generated: either forwarded via a blanket impl, or direct for concrete specified types.
ⓘ
#[<attribute>]
#[<attribute>(skip)] #[<attribute>(ignore)]
#[<attribute>(forward)]
#[<attribute>(<types>)]Variants§
Trait Implementations§
Source§impl From<Conversion> for FieldConversion
impl From<Conversion> for FieldConversion
Source§fn from(v: Conversion) -> Self
fn from(v: Conversion) -> Self
Converts to this type from the input type.
Source§impl From<FieldConversion> for Either<Empty, Either<Skip, Either<Forward, Types>>>
impl From<FieldConversion> for Either<Empty, Either<Skip, Either<Forward, Types>>>
Source§fn from(v: FieldConversion) -> Self
fn from(v: FieldConversion) -> Self
Converts to this type from the input type.
Source§impl From<FieldConversion> for Option<Conversion>
impl From<FieldConversion> for Option<Conversion>
Source§fn from(v: FieldConversion) -> Self
fn from(v: FieldConversion) -> Self
Converts to this type from the input type.
Source§impl Parse for FieldConversion
impl Parse for FieldConversion
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMultiple for FieldConversion
impl ParseMultiple for FieldConversion
Source§fn merge_attrs(
prev: Spanning<Self>,
new: Spanning<Self>,
name: &Ident,
) -> Result<Spanning<Self>>
fn merge_attrs( prev: Spanning<Self>, new: Spanning<Self>, name: &Ident, ) -> Result<Spanning<Self>>
Merges multiple values of this attribute into a single one. Read more
Source§fn merge_opt_attrs(
prev: Option<Spanning<Self>>,
new: Option<Spanning<Self>>,
name: &Ident,
) -> Result<Option<Spanning<Self>>>
fn merge_opt_attrs( prev: Option<Spanning<Self>>, new: Option<Spanning<Self>>, name: &Ident, ) -> Result<Option<Spanning<Self>>>
Auto Trait Implementations§
impl Freeze for FieldConversion
impl RefUnwindSafe for FieldConversion
impl !Send for FieldConversion
impl !Sync for FieldConversion
impl Unpin for FieldConversion
impl UnwindSafe for FieldConversion
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