pub struct Mapping {
pub mapping_type: MappingType,
pub extra: BTreeMap<String, GenericValue>,
pub map_values: Option<MappingType>,
}Expand description
OpenSearch mapping. mapping_type is required; all other properties are passed through as-is.
Fields§
§mapping_type: MappingType§extra: BTreeMap<String, GenericValue>§map_values: Option<MappingType>For a map field (a dynamic-key object), the mapping type of every
value; None for every other field. Internal metadata only — it is
not serialized into the index body (a map carries just
{"type":"object","dynamic":true}, the latter via extra). It exists so
a consumer turning the mapping into typed bindings can tell a map from a
plain object and offer a value-kind-typed handle.
Trait Implementations§
Source§impl Serialize for Mapping
Serializes the way OpenSearch expects a field mapping — { "type": …, …extra }
— rather than the struct’s two named fields. The extra settings sit beside
type, exactly as they would in the index body.
impl Serialize for Mapping
Serializes the way OpenSearch expects a field mapping — { "type": …, …extra }
— rather than the struct’s two named fields. The extra settings sit beside
type, exactly as they would in the index body.
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for Mapping
impl RefUnwindSafe for Mapping
impl Send for Mapping
impl Sync for Mapping
impl Unpin for Mapping
impl UnsafeUnpin for Mapping
impl UnwindSafe for Mapping
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