Skip to main content

VariantArraySlotsExt

Trait VariantArraySlotsExt 

Source
pub trait VariantArraySlotsExt<'a>: BorrowArraySlots<'a, Variant> {
    // Provided methods
    fn core_storage(self) -> &'a ArrayRef { ... }
    fn shredded(self) -> Option<&'a ArrayRef> { ... }
    fn slots_view(self) -> VariantSlotsView<'a> { ... }
}
Expand description

Typed slot accessors for Variant arrays.

Implemented for &'a T where T: TypedArrayRef, and for ArrayView<'a, _>. The accessors take self by value and return references borrowed for 'a, so slots read from a temporary ArrayView outlive the view.

Provided Methods§

Source

fn core_storage(self) -> &'a ArrayRef

Returns the core_storage slot.

Source

fn shredded(self) -> Option<&'a ArrayRef>

Returns the shredded slot.

Source

fn slots_view(self) -> VariantSlotsView<'a>

Returns a borrowed view of all slots.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§