pub struct Union {
pub mode: UnionMode,
pub type_ids: Option<Vec<i32>>,
}Expand description
A union is a complex type with children in Field
By default ids in the type vector refer to the offsets in the children
optionally typeIds provides an indirection between the child offset and the type id
for each child typeIds[offset] is the id used in the type vector
Generated from these locations:
- Table
Unionin the fileSchema.fbs:154
Fields§
§mode: UnionModeThe field mode in the table Union
type_ids: Option<Vec<i32>>The field typeIds in the table Union
Implementations§
Source§impl Union
impl Union
Sourcepub fn builder() -> UnionBuilder<()>
pub fn builder() -> UnionBuilder<()>
Creates a UnionBuilder for serializing an instance of this table.
pub fn create( builder: &mut Builder, field_mode: impl WriteAsDefault<UnionMode, UnionMode>, field_type_ids: impl WriteAsOptional<Offset<[i32]>>, ) -> Offset<Self>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Union
impl<'de> Deserialize<'de> for Union
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 Ord for Union
impl Ord for Union
Source§impl PartialOrd for Union
impl PartialOrd for Union
impl Eq for Union
impl StructuralPartialEq for Union
impl VectorWrite<Offset<Union>> for Union
§Safety
The planus compiler generates implementations that initialize
the bytes in write_values.
impl WriteAs<Offset<Union>> for Union
impl WriteAsOffset<Union> for Union
impl<T0: WriteAsDefault<UnionMode, UnionMode>, T1: WriteAsOptional<Offset<[i32]>>> WriteAsOffset<Union> for UnionBuilder<(T0, T1)>
impl WriteAsOptional<Offset<Union>> 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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more