pub enum OrTypeVariant {
AnonymousRecord(Record),
Regular(Field),
Constant(Field),
}Variants§
Implementations§
Source§impl OrTypeVariant
impl OrTypeVariant
pub fn new_record(record: Record) -> OrTypeVariant
pub fn new_constant(variant: Field) -> OrTypeVariant
pub fn new_regular(variant: Field) -> OrTypeVariant
pub fn is_constant(&self) -> bool
pub fn name(&self) -> String
pub fn line_number(&self) -> usize
pub fn fields(&self) -> Vec<&Field>
Trait Implementations§
Source§impl Clone for OrTypeVariant
impl Clone for OrTypeVariant
Source§fn clone(&self) -> OrTypeVariant
fn clone(&self) -> OrTypeVariant
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 OrTypeVariant
impl Debug for OrTypeVariant
Source§impl<'de> Deserialize<'de> for OrTypeVariant
impl<'de> Deserialize<'de> for OrTypeVariant
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for OrTypeVariant
impl PartialEq for OrTypeVariant
Source§impl Serialize for OrTypeVariant
impl Serialize for OrTypeVariant
impl StructuralPartialEq for OrTypeVariant
Auto Trait Implementations§
impl Freeze for OrTypeVariant
impl RefUnwindSafe for OrTypeVariant
impl Send for OrTypeVariant
impl Sync for OrTypeVariant
impl Unpin for OrTypeVariant
impl UnwindSafe for OrTypeVariant
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