pub struct Array { /* private fields */ }
Implementations§
Source§impl Array
impl Array
pub fn new() -> Array
pub fn as_slice(&self) -> &[Value]
pub fn as_mut_slice(&mut self) -> &mut [Value]
pub fn push(&mut self, value: impl Into<Value>)
pub fn pop(&mut self) -> Option<Value>
pub fn iter(&self) -> Iter<'_, Value>
pub fn iter_mut(&mut self) -> IterMut<'_, Value>
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
Source§impl Array
impl Array
Sourcepub fn get_serialized_value_len(&self) -> usize
pub fn get_serialized_value_len(&self) -> usize
Returns the size of serialized value.
This doesn’t include tag or name of key.
Sourcepub fn write_value<W: BsonWriter>(&self, w: &mut W) -> Result<(), W::Error>
pub fn write_value<W: BsonWriter>(&self, w: &mut W) -> Result<(), W::Error>
Writes the value to the BsonWriter
Sourcepub fn parse_array<R: BsonReader>(r: &mut R) -> Result<Self, R::Error>
pub fn parse_array<R: BsonReader>(r: &mut R) -> Result<Self, R::Error>
Parses the array
Trait Implementations§
Source§impl<T: Into<Value>> FromIterator<T> for Array
impl<T: Into<Value>> FromIterator<T> for Array
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 IntoIterator for Array
impl IntoIterator for Array
impl StructuralPartialEq for Array
Auto Trait Implementations§
impl Freeze for Array
impl RefUnwindSafe for Array
impl Send for Array
impl Sync for Array
impl Unpin for Array
impl UnwindSafe for Array
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more