Skip to main content

ExtIterItem

Enum ExtIterItem 

Source
#[non_exhaustive]
pub enum ExtIterItem<'a> { Descriptor(AnyDescriptor<'a>), CustomExtension { tag_extension: u8, value: Box<dyn ExtensionObject>, }, }
Expand description

Item produced by DescriptorLoop::iter_with_extensions.

Extends AnyDescriptor with a third arm for custom-registered extension bodies whose descriptor_tag_extension is recognised by an ExtensionRegistry. The value field can be downcast to the concrete type via downcast_ref on the value (see ExtensionObject)

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.
§

Descriptor(AnyDescriptor<'a>)

A regular descriptor (including built-in extension descriptors).

§

CustomExtension

A custom-registered extension body (tag 0x7F, known descriptor_tag_extension).

Fields

§tag_extension: u8

The descriptor_tag_extension byte.

§value: Box<dyn ExtensionObject>

The parsed, type-erased extension body value. Call downcast_ref on it (see ExtensionObject) to recover the concrete type.

Trait Implementations§

Source§

impl<'a> Debug for ExtIterItem<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> Serialize for ExtIterItem<'a>

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for ExtIterItem<'a>

§

impl<'a> !UnwindSafe for ExtIterItem<'a>

§

impl<'a> Freeze for ExtIterItem<'a>

§

impl<'a> Send for ExtIterItem<'a>

§

impl<'a> Sync for ExtIterItem<'a>

§

impl<'a> Unpin for ExtIterItem<'a>

§

impl<'a> UnsafeUnpin for ExtIterItem<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> DescriptorObject for T
where T: Debug + Any + Send + Sync + Serialize,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Borrow as &dyn Any so the caller can downcast to the concrete type.
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> ExtensionObject for T
where T: Debug + Any + Send + Sync + Serialize,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Borrow as &dyn Any so the caller can downcast to the concrete type.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Serialize for T
where T: Serialize + ?Sized,

Source§

fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>

Source§

fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>

Source§

impl<T> TableObject for T
where T: Debug + Any + Send + Sync + Serialize,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Borrow as &dyn Any so the caller can downcast to the concrete type.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.