pub enum SampleUnion {
One(String),
Two(TestResult),
Three(F32Data),
Four(F64Data),
}
Expand description
A test of union
Variants§
One(String)
first field is a String n(0)
Two(TestResult)
Second field is a TestResult n(1)
Three(F32Data)
Third field is array of f32 n(2)
Four(F64Data)
Fourth field is array of f64 n(3)
Trait Implementations§
Source§impl Clone for SampleUnion
impl Clone for SampleUnion
Source§fn clone(&self) -> SampleUnion
fn clone(&self) -> SampleUnion
Returns a copy 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 SampleUnion
impl Debug for SampleUnion
Source§impl<'de> Deserialize<'de> for SampleUnion
impl<'de> Deserialize<'de> for SampleUnion
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 SampleUnion
impl PartialEq for SampleUnion
Source§impl Serialize for SampleUnion
impl Serialize for SampleUnion
impl StructuralPartialEq for SampleUnion
Auto Trait Implementations§
impl Freeze for SampleUnion
impl RefUnwindSafe for SampleUnion
impl Send for SampleUnion
impl Sync for SampleUnion
impl Unpin for SampleUnion
impl UnwindSafe for SampleUnion
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