#[non_exhaustive]pub enum MinimalTypeObject {
Alias(MinimalAliasType),
Annotation(MinimalAnnotationType),
Struct(MinimalStructType),
Union(MinimalUnionType),
Bitset(MinimalBitsetType),
Sequence(MinimalSequenceType),
Array(MinimalArrayType),
Map(MinimalMapType),
Enumerated(MinimalEnumeratedType),
Bitmask(MinimalBitmaskType),
}Expand description
MinimalTypeObject (§7.3.4.4). Discriminated Union mit 1-byte TypeKind-Discriminator ueber allen Variants.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Alias(MinimalAliasType)
alias<T>.
Annotation(MinimalAnnotationType)
annotation @X(...).
Struct(MinimalStructType)
struct.
Union(MinimalUnionType)
union.
Bitset(MinimalBitsetType)
bitset.
Sequence(MinimalSequenceType)
sequence<T>.
Array(MinimalArrayType)
T[N].
Map(MinimalMapType)
map<K, V>.
Enumerated(MinimalEnumeratedType)
enum.
Bitmask(MinimalBitmaskType)
bitmask.
Implementations§
Source§impl MinimalTypeObject
impl MinimalTypeObject
Sourcepub const fn discriminator(&self) -> u8
pub const fn discriminator(&self) -> u8
TypeKind-Discriminator-Byte.
Sourcepub fn encode_into(&self, w: &mut BufferWriter) -> Result<(), EncodeError>
pub fn encode_into(&self, w: &mut BufferWriter) -> Result<(), EncodeError>
Sourcepub fn decode_from(r: &mut BufferReader<'_>) -> Result<Self, TypeCodecError>
pub fn decode_from(r: &mut BufferReader<'_>) -> Result<Self, TypeCodecError>
Decode.
§Errors
TypeCodecError::UnknownTypeKind bei unbekanntem Discriminator,
sonst CDR-Decoder-Fehler.
Sourcepub fn to_bytes_le(&self) -> Result<Vec<u8>, EncodeError>
pub fn to_bytes_le(&self) -> Result<Vec<u8>, EncodeError>
Sourcepub fn from_bytes_le(bytes: &[u8]) -> Result<Self, TypeCodecError>
pub fn from_bytes_le(bytes: &[u8]) -> Result<Self, TypeCodecError>
Trait Implementations§
Source§impl Clone for MinimalTypeObject
impl Clone for MinimalTypeObject
Source§fn clone(&self) -> MinimalTypeObject
fn clone(&self) -> MinimalTypeObject
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MinimalTypeObject
impl Debug for MinimalTypeObject
Source§impl PartialEq for MinimalTypeObject
impl PartialEq for MinimalTypeObject
Source§fn eq(&self, other: &MinimalTypeObject) -> bool
fn eq(&self, other: &MinimalTypeObject) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for MinimalTypeObject
impl StructuralPartialEq for MinimalTypeObject
Auto Trait Implementations§
impl Freeze for MinimalTypeObject
impl RefUnwindSafe for MinimalTypeObject
impl Send for MinimalTypeObject
impl Sync for MinimalTypeObject
impl Unpin for MinimalTypeObject
impl UnsafeUnpin for MinimalTypeObject
impl UnwindSafe for MinimalTypeObject
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