pub struct MappingDocument(/* private fields */);Expand description
A wrapper around the generated Elasticsearch mapping JSON.
This struct contains the complete mapping definition including the "mappings"
root object with its "properties" field.
§Example
use elastic_mapping::{Document, MappingObject};
#[derive(Document)]
struct MyDoc {
field: String,
}
let mapping = MyDoc::document_mapping();
let json = mapping.inner();
println!("{}", serde_json::to_string_pretty(json).unwrap());Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MappingDocument
impl RefUnwindSafe for MappingDocument
impl Send for MappingDocument
impl Sync for MappingDocument
impl Unpin for MappingDocument
impl UnwindSafe for MappingDocument
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