[][src]Struct rawbson::DocBuf

pub struct DocBuf { /* fields omitted */ }

Implementations

impl DocBuf[src]

pub fn as_docref(&self) -> DocRef<'_>[src]

pub fn new(data: Vec<u8>) -> RawResult<DocBuf>[src]

pub fn from_document(doc: &Document) -> DocBuf[src]

pub unsafe fn new_unchecked(data: Vec<u8>) -> DocBuf[src]

Create a DocumentBuf from an owned Vec.

Safety

The provided bytes must be a valid bson document

pub fn iter(&self) -> DocIter<'_>

Notable traits for DocIter<'a>

impl<'a> Iterator for DocIter<'a> type Item = RawResult<(&'a str, Element<'a>)>;
[src]

pub fn get<'a>(&'a self, key: &str) -> RawResult<Option<Element<'a>>>[src]

pub fn get_f64(&self, key: &str) -> RawResult<Option<f64>>[src]

pub fn get_str<'a>(&'a self, key: &str) -> RawResult<Option<&'a str>>[src]

pub fn get_document<'a>(&'a self, key: &str) -> RawResult<Option<DocRef<'a>>>[src]

pub fn get_array<'a>(&'a self, key: &str) -> RawResult<Option<ArrayRef<'a>>>[src]

pub fn get_binary<'a>(
    &'a self,
    key: &str
) -> RawResult<Option<RawBsonBinary<'a>>>
[src]

pub fn get_object_id(&self, key: &str) -> RawResult<Option<ObjectId>>[src]

pub fn get_bool(&self, key: &str) -> RawResult<Option<bool>>[src]

pub fn get_datetime(&self, key: &str) -> RawResult<Option<DateTime<Utc>>>[src]

pub fn get_null(&self, key: &str) -> RawResult<Option<()>>[src]

pub fn get_regex<'a>(&'a self, key: &str) -> RawResult<Option<RawBsonRegex<'a>>>[src]

pub fn get_javascript<'a>(&'a self, key: &str) -> RawResult<Option<&'a str>>[src]

pub fn get_symbol<'a>(&'a self, key: &str) -> RawResult<Option<&'a str>>[src]

pub fn get_javascript_with_scope<'a>(
    &'a self,
    key: &str
) -> RawResult<Option<(&'a str, DocRef<'a>)>>
[src]

pub fn get_i32(&self, key: &str) -> RawResult<Option<i32>>[src]

pub fn get_timestamp<'a>(
    &'a self,
    key: &str
) -> RawResult<Option<RawBsonTimestamp<'a>>>
[src]

pub fn get_i64(&self, key: &str) -> RawResult<Option<i64>>[src]

pub fn into_inner(self) -> Vec<u8>[src]

pub fn as_bytes(&self) -> &[u8][src]

Trait Implementations

impl Clone for DocBuf[src]

impl<'a> IntoIterator for &'a DocBuf[src]

type IntoIter = DocIter<'a>

Which kind of iterator are we turning this into?

type Item = RawResult<(&'a str, Element<'a>)>

The type of the elements being iterated over.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,