Enum mango_orm::models::output_data::OutputDataMany [−][src]
pub enum OutputDataMany { Data((Option<Document>, Option<FindOptions>, Collection, Vec<String>, HashMap<String, String>, String)), }
Expand description
To return results after processing queries for many documents.
Variants
Data((Option<Document>, Option<FindOptions>, Collection, Vec<String>, HashMap<String, String>, String))
Implementations
Example:
let filter = doc!{}; let output_data = UserProfile::find(filter, None)?; if output_data.is_valid()? { // Get raw documents. (Hint: For non-standard operations.) println!("{:?}", routput_data.raw_docs()?); }
Get prepared documents. Hint: For page template.
Example:
let filter = doc!{}; let output_data = UserProfile::find(filter, None)?; if output_data.is_valid()? { // Get prepared documents. (Hint: For page template.) println!("{:?}", routput_data.docs()?); }
Get json-line. Hint: For Ajax.
Example:
let filter = doc!{}; let output_data = UserProfile::find(filter, None)?; if output_data.is_valid()? { // Get json-line. (Hint: For Ajax.) println!("{:?}", routput_data.json()?); }
Get validation status (boolean) Hint: For check documents availability.
Example:
let filter = doc!{}; let output_data = UserProfile::find(filter, None)?; if output_data.is_valid()? { ... }
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for OutputDataMany
impl Send for OutputDataMany
impl Sync for OutputDataMany
impl Unpin for OutputDataMany
impl !UnwindSafe for OutputDataMany
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self