pub struct UnionMetaType {
pub type_: Ident,
pub display_name: Option<String>,
}
Expand description
Type information that represents one type unified by a UnionMeta
.
Fields§
§type_: Ident
Target type of this type variant.
display_name: Option<String>
Name of the variant to use inside the generated code.
Implementations§
Source§impl UnionMetaType
impl UnionMetaType
Sourcepub fn new(type_: Ident) -> Self
pub fn new(type_: Ident) -> Self
Create a new UnionMetaType
from the passed type_
.
Trait Implementations§
Source§impl Clone for UnionMetaType
impl Clone for UnionMetaType
Source§fn clone(&self) -> UnionMetaType
fn clone(&self) -> UnionMetaType
Returns a duplicate 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 Debug for UnionMetaType
impl Debug for UnionMetaType
Source§impl TypeEq for UnionMetaType
impl TypeEq for UnionMetaType
Source§fn type_hash<H: Hasher>(&self, hasher: &mut H, types: &MetaTypes)
fn type_hash<H: Hasher>(&self, hasher: &mut H, types: &MetaTypes)
Feeds this value into the given
Hasher
.Source§fn type_eq(&self, other: &Self, types: &MetaTypes) -> bool
fn type_eq(&self, other: &Self, types: &MetaTypes) -> bool
Check if this instance is equal to the
other
instance using the passed
types
to resolve identifiers.Source§fn type_hash_slice<H: Hasher>(slice: &[Self], hasher: &mut H, types: &MetaTypes)
fn type_hash_slice<H: Hasher>(slice: &[Self], hasher: &mut H, types: &MetaTypes)
Feeds a slice of this value into the given
Hasher
.Source§fn type_eq_iter<'a, X, Y>(x: X, y: Y, types: &MetaTypes) -> boolwhere
Self: 'a,
X: IntoIterator<Item = &'a Self>,
Y: IntoIterator<Item = &'a Self>,
fn type_eq_iter<'a, X, Y>(x: X, y: Y, types: &MetaTypes) -> boolwhere
Self: 'a,
X: IntoIterator<Item = &'a Self>,
Y: IntoIterator<Item = &'a Self>,
Check if the two passed iterators contain type equal elements.
Auto Trait Implementations§
impl Freeze for UnionMetaType
impl RefUnwindSafe for UnionMetaType
impl Send for UnionMetaType
impl Sync for UnionMetaType
impl Unpin for UnionMetaType
impl UnwindSafe for UnionMetaType
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