pub enum FacetInner {
Show 15 variants
Sensitive(KSensitive),
Invariants(InvariantInner),
Opaque(KOpaque),
DenyUnknownFields(KDenyUnknownFields),
DefaultEquals(DefaultEqualsInner),
Default(KDefault),
Transparent(KTransparent),
RenameAll(RenameAllInner),
Rename(RenameInner),
Flatten(FlattenInner),
Child(ChildInner),
SkipSerializing(SkipSerializingInner),
SkipSerializingIf(SkipSerializingIfInner),
TypeTag(TypeTagInner),
Arbitrary(VerbatimUntil<Comma>),
}Expand description
Represents the inner content of a facet attribute.
Variants§
Sensitive(KSensitive)
A sensitive attribute that specifies sensitivity information.
Invariants(InvariantInner)
An invariants attribute that specifies invariants for the type.
Opaque(KOpaque)
An opaque attribute that specifies opaque information.
DenyUnknownFields(KDenyUnknownFields)
A deny_unknown_fields attribute that specifies whether unknown fields are allowed.
DefaultEquals(DefaultEqualsInner)
A default attribute with an explicit value (#[facet(default = “myfunc”)])
Default(KDefault)
A default attribute with no explicit value (#[facet(default)])
Transparent(KTransparent)
A transparent attribute for containers
RenameAll(RenameAllInner)
A rename_all attribute that specifies a case conversion for all fields/variants (#[facet(rename_all = “camelCase”)])
Rename(RenameInner)
A rename attribute that specifies a custom name for a field/variant (#[facet(rename = “custom_name”)])
Flatten(FlattenInner)
A flatten attribute that marks a field to be flattened into the parent structure
Child(ChildInner)
A child attribute that marks a field as a child node
SkipSerializing(SkipSerializingInner)
A skip_serializing attribute that specifies whether a field should be skipped during serialization.
SkipSerializingIf(SkipSerializingIfInner)
A skip_serializing_if attribute that specifies a condition for skipping serialization.
TypeTag(TypeTagInner)
A type_tag attribute that specifies the identifying tag for self describing formats
Arbitrary(VerbatimUntil<Comma>)
Any other attribute represented as a sequence of token trees.
Trait Implementations§
Source§impl Debug for FacetInner
impl Debug for FacetInner
Source§impl Parser for FacetInner
impl Parser for FacetInner
Source§impl ToTokens for FacetInner
impl ToTokens for FacetInner
Source§fn to_tokens(&self, tokens: &mut TokenStream)
fn to_tokens(&self, tokens: &mut TokenStream)
&self to the given TokenStream.Source§fn to_token_iter(
&self,
) -> ShadowCountedIter<'_, <TokenStream as IntoIterator>::IntoIter> ⓘ
fn to_token_iter( &self, ) -> ShadowCountedIter<'_, <TokenStream as IntoIterator>::IntoIter> ⓘ
&self into a TokenIter object.Source§fn into_token_iter<'a>(
self,
) -> ShadowCountedIter<'a, <TokenStream as IntoIterator>::IntoIter> ⓘwhere
Self: Sized,
fn into_token_iter<'a>(
self,
) -> ShadowCountedIter<'a, <TokenStream as IntoIterator>::IntoIter> ⓘwhere
Self: Sized,
self into a TokenIter object.Source§fn to_token_stream(&self) -> TokenStream
fn to_token_stream(&self) -> TokenStream
&self into a TokenStream object.Source§fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
self into a TokenStream object.Auto Trait Implementations§
impl Freeze for FacetInner
impl RefUnwindSafe for FacetInner
impl !Send for FacetInner
impl !Sync for FacetInner
impl Unpin for FacetInner
impl UnwindSafe for FacetInner
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
Source§impl<T> Parse for Twhere
T: Parser,
impl<T> Parse for Twhere
T: Parser,
Source§fn parse(
tokens: &mut ShadowCountedIter<'_, <TokenStream as IntoIterator>::IntoIter>,
) -> Result<Self, Error>
fn parse( tokens: &mut ShadowCountedIter<'_, <TokenStream as IntoIterator>::IntoIter>, ) -> Result<Self, Error>
parser() within a
transaction. Commits changes on success and returns the parsed value. Read moreSource§fn parse_all(
tokens: &mut ShadowCountedIter<'_, <TokenStream as IntoIterator>::IntoIter>,
) -> Result<Self, Error>
fn parse_all( tokens: &mut ShadowCountedIter<'_, <TokenStream as IntoIterator>::IntoIter>, ) -> Result<Self, Error>
EndOfStream at the end. Thus it will error if parsing is not exhaustive. Read moreSource§fn parse_with<T>(
tokens: &mut ShadowCountedIter<'_, <TokenStream as IntoIterator>::IntoIter>,
f: impl FnOnce(Self, &mut ShadowCountedIter<'_, <TokenStream as IntoIterator>::IntoIter>) -> Result<T, Error>,
) -> Result<T, Error>
fn parse_with<T>( tokens: &mut ShadowCountedIter<'_, <TokenStream as IntoIterator>::IntoIter>, f: impl FnOnce(Self, &mut ShadowCountedIter<'_, <TokenStream as IntoIterator>::IntoIter>) -> Result<T, Error>, ) -> Result<T, Error>
FnOnce(Self, &mut TokenIter) -> Result<T> closure which
creates a new result or returns an Error. Read more