Struct sofa::DocumentCollection [−][src]
pub struct DocumentCollection { pub offset: u32, pub rows: Vec<DocumentCollectionItem>, pub total_rows: u32, }
Memory-optimized, iterable document collection, mostly returned in calls
that involve multiple documents results Can target a specific index through
implementation of Index
and IndexMut
Fields
offset: u32
rows: Vec<DocumentCollectionItem>
total_rows: u32
Methods
impl DocumentCollection
[src]
impl DocumentCollection
pub fn new(doc: Value) -> DocumentCollection
[src]
pub fn new(doc: Value) -> DocumentCollection
pub fn new_from_documents(docs: Vec<Document>) -> DocumentCollection
[src]
pub fn new_from_documents(docs: Vec<Document>) -> DocumentCollection
pub fn get_data(&self) -> Vec<Value>
[src]
pub fn get_data(&self) -> Vec<Value>
Returns raw JSON data from documents
Trait Implementations
impl Default for DocumentCollection
[src]
impl Default for DocumentCollection
fn default() -> DocumentCollection
[src]
fn default() -> DocumentCollection
Returns the "default value" for a type. Read more
impl PartialEq for DocumentCollection
[src]
impl PartialEq for DocumentCollection
fn eq(&self, other: &DocumentCollection) -> bool
[src]
fn eq(&self, other: &DocumentCollection) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &DocumentCollection) -> bool
[src]
fn ne(&self, other: &DocumentCollection) -> bool
This method tests for !=
.
impl Debug for DocumentCollection
[src]
impl Debug for DocumentCollection
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for DocumentCollection
[src]
impl Clone for DocumentCollection
fn clone(&self) -> DocumentCollection
[src]
fn clone(&self) -> DocumentCollection
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Index<usize> for DocumentCollection
[src]
impl Index<usize> for DocumentCollection
type Output = DocumentCollectionItem
The returned type after indexing.
fn index(&self, index: usize) -> &DocumentCollectionItem
[src]
fn index(&self, index: usize) -> &DocumentCollectionItem
Performs the indexing (container[index]
) operation.
impl IndexMut<usize> for DocumentCollection
[src]
impl IndexMut<usize> for DocumentCollection
fn index_mut(&mut self, index: usize) -> &mut DocumentCollectionItem
[src]
fn index_mut(&mut self, index: usize) -> &mut DocumentCollectionItem
Performs the mutable indexing (container[index]
) operation.
Auto Trait Implementations
impl Send for DocumentCollection
impl Send for DocumentCollection
impl Sync for DocumentCollection
impl Sync for DocumentCollection