pub struct DynUnionView<'a> { /* private fields */ }Expand description
View over a union value.
Implementations§
Source§impl<'a> DynUnionView<'a>
impl<'a> DynUnionView<'a>
Sourcepub fn variant_name(&self) -> Option<&str>
pub fn variant_name(&self) -> Option<&str>
Returns the name of the active variant, if present.
Sourcepub fn value(&'a self) -> Result<Option<DynCellRef<'a>>, DynViewError>
pub fn value(&'a self) -> Result<Option<DynCellRef<'a>>, DynViewError>
Retrieve the active value (or None if the variant payload is null).
Trait Implementations§
Source§impl<'a> Clone for DynUnionView<'a>
impl<'a> Clone for DynUnionView<'a>
Source§fn clone(&self) -> DynUnionView<'a>
fn clone(&self) -> DynUnionView<'a>
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 moreAuto Trait Implementations§
impl<'a> Freeze for DynUnionView<'a>
impl<'a> !RefUnwindSafe for DynUnionView<'a>
impl<'a> Send for DynUnionView<'a>
impl<'a> Sync for DynUnionView<'a>
impl<'a> Unpin for DynUnionView<'a>
impl<'a> !UnwindSafe for DynUnionView<'a>
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