pub enum DataRef<V0, V1> {
Real(V0),
Complex(V1),
}
Expand description
Data saved by an Analysis
.
Variants§
Implementations§
source§impl<V0, V1> DataRef<V0, V1>
impl<V0, V1> DataRef<V0, V1>
sourcepub fn unwrap_real(self) -> V0
pub fn unwrap_real(self) -> V0
Returns the value contained in this variant.
§Panics
Panics if the enum value is not of the expected variant.
sourcepub fn get_real(&self) -> Option<&V0>
pub fn get_real(&self) -> Option<&V0>
Returns a reference to the value contained in this variant.
Returns None
if the enum value is not of the expected variant.
sourcepub fn into_real(self) -> Option<V0>
pub fn into_real(self) -> Option<V0>
Returns the value contained in this variant.
Returns None
if the enum value is not of the expected variant.
sourcepub fn unwrap_complex(self) -> V1
pub fn unwrap_complex(self) -> V1
Returns the value contained in this variant.
§Panics
Panics if the enum value is not of the expected variant.
sourcepub fn get_complex(&self) -> Option<&V1>
pub fn get_complex(&self) -> Option<&V1>
Returns a reference to the value contained in this variant.
Returns None
if the enum value is not of the expected variant.
sourcepub fn into_complex(self) -> Option<V1>
pub fn into_complex(self) -> Option<V1>
Returns the value contained in this variant.
Returns None
if the enum value is not of the expected variant.
sourcepub fn is_complex(&self) -> bool
pub fn is_complex(&self) -> bool
Returns true if this value is the expected variant.
Auto Trait Implementations§
impl<V0, V1> RefUnwindSafe for DataRef<V0, V1>where
V0: RefUnwindSafe,
V1: RefUnwindSafe,
impl<V0, V1> Send for DataRef<V0, V1>
impl<V0, V1> Sync for DataRef<V0, V1>
impl<V0, V1> Unpin for DataRef<V0, V1>
impl<V0, V1> UnwindSafe for DataRef<V0, V1>where
V0: UnwindSafe,
V1: UnwindSafe,
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