pub struct MutableArray<'a, T> { /* private fields */ }Expand description
An owned mutable array with dirty tracking for generated messages.
Implementations§
Source§impl<'a, T> MutableArray<'a, T>
impl<'a, T> MutableArray<'a, T>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn reserve(&mut self, additional: usize)
pub fn as_slice(&self) -> &[T]
pub fn as_mut_slice(&mut self) -> &mut [T]
pub fn iter(&self) -> impl Iterator<Item = &T>
pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut T>
Source§impl<'a, T: MutableArrayElement<'a>> MutableArray<'a, T>
impl<'a, T: MutableArrayElement<'a>> MutableArray<'a, T>
Sourcepub fn from_words(words: &'a [u32]) -> Option<Self>
pub fn from_words(words: &'a [u32]) -> Option<Self>
Decodes all elements from an encoded array.
Sourcepub fn encode_to_unit(&self, buffer: &mut Buffer) -> Result<Unit, MutableError>
pub fn encode_to_unit(&self, buffer: &mut Buffer) -> Result<Unit, MutableError>
Encodes the array into buffer and returns its field representation.
Trait Implementations§
Source§impl<'a, T: Clone> Clone for MutableArray<'a, T>
impl<'a, T: Clone> Clone for MutableArray<'a, T>
Source§fn clone(&self) -> MutableArray<'a, T>
fn clone(&self) -> MutableArray<'a, T>
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<'a, T: Debug> Debug for MutableArray<'a, T>
impl<'a, T: Debug> Debug for MutableArray<'a, T>
Source§impl<'a, T> Default for MutableArray<'a, T>
impl<'a, T> Default for MutableArray<'a, T>
Source§impl<'a, T> Extend<T> for MutableArray<'a, T>
impl<'a, T> Extend<T> for MutableArray<'a, T>
Source§fn extend<I: IntoIterator<Item = T>>(&mut self, iter: I)
fn extend<I: IntoIterator<Item = T>>(&mut self, iter: I)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl<'a, T> From<Vec<T>> for MutableArray<'a, T>
impl<'a, T> From<Vec<T>> for MutableArray<'a, T>
Source§impl<'a, T> FromIterator<T> for MutableArray<'a, T>
impl<'a, T> FromIterator<T> for MutableArray<'a, T>
Source§fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self
Creates a value from an iterator. Read more
Source§impl<'a, T> Index<usize> for MutableArray<'a, T>
impl<'a, T> Index<usize> for MutableArray<'a, T>
Source§impl<'a, T> IndexMut<usize> for MutableArray<'a, T>
impl<'a, T> IndexMut<usize> for MutableArray<'a, T>
Source§impl<'b, 'a, T> IntoIterator for &'b MutableArray<'a, T>
impl<'b, 'a, T> IntoIterator for &'b MutableArray<'a, T>
Source§impl<'b, 'a, T> IntoIterator for &'b mut MutableArray<'a, T>
impl<'b, 'a, T> IntoIterator for &'b mut MutableArray<'a, T>
Source§impl<'a, T: MutableArrayElement<'a>> MutableArrayElement<'a> for MutableArray<'a, T>
impl<'a, T: MutableArrayElement<'a>> MutableArrayElement<'a> for MutableArray<'a, T>
fn decode_array(words: &'a [u32]) -> Option<Vec<Self>>
fn detect_array_field(field: FieldView<'a>) -> Option<&'a [u32]>
fn encode_array( values: &[Self], buffer: &mut Buffer, ) -> Result<Unit, MutableError>
fn detect_array_words(words: &'a [u32]) -> Option<&'a [u32]>
Source§impl<'a, T: MutableArrayElement<'a>> MutableField<'a> for MutableArray<'a, T>
impl<'a, T: MutableArrayElement<'a>> MutableField<'a> for MutableArray<'a, T>
fn decode(field: FieldView<'a>) -> Option<Self>
fn detect(field: FieldView<'a>) -> Option<&'a [u32]>
fn encode(&self, buffer: &mut Buffer) -> Result<Unit, MutableError>
fn is_empty_field(&self) -> bool
fn omits_default_after_encode() -> boolwhere
Self: Sized,
fn is_dirty(&self) -> bool
fn has_nested_dirty(&self) -> bool
fn folds_when_present() -> boolwhere
Self: Sized,
Auto Trait Implementations§
impl<'a, T> Freeze for MutableArray<'a, T>
impl<'a, T> RefUnwindSafe for MutableArray<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for MutableArray<'a, T>where
T: Send,
impl<'a, T> Sync for MutableArray<'a, T>where
T: Sync,
impl<'a, T> Unpin for MutableArray<'a, T>where
T: Unpin,
impl<'a, T> UnsafeUnpin for MutableArray<'a, T>
impl<'a, T> UnwindSafe for MutableArray<'a, T>where
T: UnwindSafe,
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