flinch::doc_trait

Trait Document

Source
pub trait Document:
    Index
    + Clips
    + Range
    + View
    + DocumentSearch {
    // Required methods
    fn from_str(input: &str) -> Result<Self, DocumentError>
       where Self: Sized;
    fn from_value(input: &Value) -> Result<Self, DocumentError>
       where Self: Sized;
    fn set_opts(&mut self, opts: &CollectionOptions);
    fn object(&self) -> &Map<String, Value>;
    fn document(&self) -> &Value;
    fn make(&self, key: String) -> Value;
    fn string(&self) -> String;
}

Required Methods§

Source

fn from_str(input: &str) -> Result<Self, DocumentError>
where Self: Sized,

Source

fn from_value(input: &Value) -> Result<Self, DocumentError>
where Self: Sized,

Source

fn set_opts(&mut self, opts: &CollectionOptions)

Source

fn object(&self) -> &Map<String, Value>

Source

fn document(&self) -> &Value

Source

fn make(&self, key: String) -> Value

Source

fn string(&self) -> String

Implementors§