pub enum CustomerRef<'__superstruct> {
V1(&'__superstruct CustomerV1),
V2(&'__superstruct CustomerV2),
V3(&'__superstruct CustomerV3),
}
Variants§
Implementations§
Source§impl<'__superstruct> CustomerRef<'__superstruct>
impl<'__superstruct> CustomerRef<'__superstruct>
pub fn name(&self) -> &'__superstruct String
pub fn age_v1(&self) -> Result<&'__superstruct String, ()>
pub fn age_v2(&self) -> Result<&'__superstruct u64, ()>
pub fn dob(&self) -> Result<&'__superstruct u64, ()>
pub fn favourite_colour(&self) -> Result<&'__superstruct String, ()>
Trait Implementations§
Source§impl<'__superstruct> Clone for CustomerRef<'__superstruct>
impl<'__superstruct> Clone for CustomerRef<'__superstruct>
Source§impl<'__superstruct> From<&'__superstruct Customer> for CustomerRef<'__superstruct>
impl<'__superstruct> From<&'__superstruct Customer> for CustomerRef<'__superstruct>
Source§impl<'__superstruct> From<&'__superstruct CustomerV1> for CustomerRef<'__superstruct>
impl<'__superstruct> From<&'__superstruct CustomerV1> for CustomerRef<'__superstruct>
Source§fn from(variant: &'__superstruct CustomerV1) -> Self
fn from(variant: &'__superstruct CustomerV1) -> Self
Converts to this type from the input type.
Source§impl<'__superstruct> From<&'__superstruct CustomerV2> for CustomerRef<'__superstruct>
impl<'__superstruct> From<&'__superstruct CustomerV2> for CustomerRef<'__superstruct>
Source§fn from(variant: &'__superstruct CustomerV2) -> Self
fn from(variant: &'__superstruct CustomerV2) -> Self
Converts to this type from the input type.
Source§impl<'__superstruct> From<&'__superstruct CustomerV3> for CustomerRef<'__superstruct>
impl<'__superstruct> From<&'__superstruct CustomerV3> for CustomerRef<'__superstruct>
Source§fn from(variant: &'__superstruct CustomerV3) -> Self
fn from(variant: &'__superstruct CustomerV3) -> Self
Converts to this type from the input type.
impl<'__superstruct> Copy for CustomerRef<'__superstruct>
Auto Trait Implementations§
impl<'__superstruct> Freeze for CustomerRef<'__superstruct>
impl<'__superstruct> RefUnwindSafe for CustomerRef<'__superstruct>
impl<'__superstruct> Send for CustomerRef<'__superstruct>
impl<'__superstruct> Sync for CustomerRef<'__superstruct>
impl<'__superstruct> Unpin for CustomerRef<'__superstruct>
impl<'__superstruct> UnwindSafe for CustomerRef<'__superstruct>
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