pub struct SplDiscriminateBuilder {
pub ident: Ident,
pub generics: Generics,
pub where_clause: Option<WhereClause>,
pub hash_input: String,
}
Expand description
“Builder” struct to implement the SplDiscriminate
trait
on an enum or struct
Fields§
§ident: Ident
The struct/enum identifier
generics: Generics
The item’s generic arguments (if any)
where_clause: Option<WhereClause>
The item’s where clause for generics (if any)
hash_input: String
The TLV hash_input
Trait Implementations§
source§impl From<&SplDiscriminateBuilder> for TokenStream
impl From<&SplDiscriminateBuilder> for TokenStream
source§fn from(builder: &SplDiscriminateBuilder) -> Self
fn from(builder: &SplDiscriminateBuilder) -> Self
Converts to this type from the input type.
source§impl Parse for SplDiscriminateBuilder
impl Parse for SplDiscriminateBuilder
fn parse(input: ParseStream<'_>) -> Result<Self>
source§impl ToTokens for SplDiscriminateBuilder
impl ToTokens for SplDiscriminateBuilder
source§fn to_tokens(&self, tokens: &mut TokenStream)
fn to_tokens(&self, tokens: &mut TokenStream)
source§fn to_token_stream(&self) -> TokenStream
fn to_token_stream(&self) -> TokenStream
source§fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
source§impl TryFrom<ItemEnum> for SplDiscriminateBuilder
impl TryFrom<ItemEnum> for SplDiscriminateBuilder
source§impl TryFrom<ItemStruct> for SplDiscriminateBuilder
impl TryFrom<ItemStruct> for SplDiscriminateBuilder
Auto Trait Implementations§
impl RefUnwindSafe for SplDiscriminateBuilder
impl !Send for SplDiscriminateBuilder
impl !Sync for SplDiscriminateBuilder
impl Unpin for SplDiscriminateBuilder
impl UnwindSafe for SplDiscriminateBuilder
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> Spanned for Twhere
T: Spanned + ?Sized,
impl<T> Spanned for Twhere
T: Spanned + ?Sized,
source§fn span(&self) -> Span
fn span(&self) -> Span
Returns a
Span
covering the complete contents of this syntax tree
node, or Span::call_site()
if this node is empty.