pub struct Union(/* private fields */);Expand description
Implementations§
Source§impl Union
impl Union
Sourcepub fn try_new(
union: impl IntoIterator<Item = (impl TryInto<Name, Error = impl Into<Box<dyn Error>>>, impl TryInto<LogicalStreamType, Error = impl Into<Box<dyn Error>>>)>,
) -> Result<Self>
pub fn try_new( union: impl IntoIterator<Item = (impl TryInto<Name, Error = impl Into<Box<dyn Error>>>, impl TryInto<LogicalStreamType, Error = impl Into<Box<dyn Error>>>)>, ) -> Result<Self>
Returns a new Union logical stream type. Returns an error when either the name or logical stream type conversion fails, or when there are duplicate names.
Sourcepub fn tag(&self) -> Option<(String, BitCount)>
pub fn tag(&self) -> Option<(String, BitCount)>
Returns the tag name and width of this union. Reference
Sourcepub fn iter(&self) -> impl Iterator<Item = (&Name, &LogicalStreamType)>
pub fn iter(&self) -> impl Iterator<Item = (&Name, &LogicalStreamType)>
Returns an iterator over the fields of the Union.
Trait Implementations§
Source§impl From<Union> for LogicalStreamType
impl From<Union> for LogicalStreamType
Source§fn from(union: Union) -> Self
fn from(union: Union) -> Self
Wraps this union in a LogicalStreamType.
impl StructuralPartialEq for Union
Auto Trait Implementations§
impl Freeze for Union
impl RefUnwindSafe for Union
impl Send for Union
impl Sync for Union
impl Unpin for Union
impl UnsafeUnpin for Union
impl UnwindSafe for Union
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