pub struct Builder<'a, T>where
T: PrimitiveElement,{ /* private fields */ }Implementations§
Source§impl<'a, T> Builder<'a, T>where
T: PrimitiveElement,
impl<'a, T> Builder<'a, T>where
T: PrimitiveElement,
pub fn len(&self) -> u32
pub fn is_empty(&self) -> bool
pub fn into_reader(self) -> Reader<'a, T>
pub fn set(&mut self, index: u32, value: T)
Sourcepub fn as_slice(&mut self) -> Option<&mut [T]>
pub fn as_slice(&mut self) -> Option<&mut [T]>
Attempts to return a view of the list as a native Rust slice.
Returns None if either:
- The elements of the list are non-contiguous, which can happen if the schema has evolved.
- The elements of the list are bit-sized, i.e. T is bool. In the case, the
list is bit-packed, and therefore differs in representation from Rust’s
&[bool].
This method raises a compile-time error if T is larger than one
byte and either the unaligned feature is enabled or the target
is big-endian.
Source§impl<T: PrimitiveElement> Builder<'_, T>
impl<T: PrimitiveElement> Builder<'_, T>
Sourcepub fn get(&self, index: u32) -> T
pub fn get(&self, index: u32) -> T
Gets the T at position index. Panics if index is greater than or
equal to len().
Sourcepub fn try_get(&self, index: u32) -> Option<T>
pub fn try_get(&self, index: u32) -> Option<T>
Gets the T at position index. Returns None if index
is greater than or equal to len().
pub fn reborrow(&mut self) -> Builder<'_, T>
Trait Implementations§
Source§impl<'a, T: PrimitiveElement + Introspect> DowncastBuilder<'a> for Builder<'a, T>
impl<'a, T: PrimitiveElement + Introspect> DowncastBuilder<'a> for Builder<'a, T>
fn downcast_builder(v: Builder<'a>) -> Self
Source§impl<'a, T: PrimitiveElement + Introspect> From<Builder<'a, T>> for Builder<'a>
impl<'a, T: PrimitiveElement + Introspect> From<Builder<'a, T>> for Builder<'a>
Source§impl<'a, T: PrimitiveElement> FromPointerBuilder<'a> for Builder<'a, T>
impl<'a, T: PrimitiveElement> FromPointerBuilder<'a> for Builder<'a, T>
fn init_pointer(builder: PointerBuilder<'a>, size: u32) -> Builder<'a, T>
fn get_from_pointer( builder: PointerBuilder<'a>, default: Option<&'a [Word]>, ) -> Result<Builder<'a, T>>
Auto Trait Implementations§
impl<'a, T> !RefUnwindSafe for Builder<'a, T>
impl<'a, T> !Send for Builder<'a, T>
impl<'a, T> !Sync for Builder<'a, T>
impl<'a, T> !UnwindSafe for Builder<'a, T>
impl<'a, T> Freeze for Builder<'a, T>
impl<'a, T> Unpin for Builder<'a, T>where
T: Unpin,
impl<'a, T> UnsafeUnpin for Builder<'a, T>
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