Struct elastic::types::prelude::Boolean [] [src]

pub struct Boolean<M> where
    M: BooleanMapping
{ /* fields omitted */ }

An Elasticsearch boolean with a mapping.

Where the mapping isn't custom, you can use the standard library bool instead.

Examples

Defining a bool with a mapping:

let boolean = Boolean::<DefaultBooleanMapping>::new(true);

Methods

impl<M> Boolean<M> where
    M: BooleanMapping
[src]

Creates a new Boolean with the given mapping.

Examples

Create a new Boolean from a bool:

let boolean = Boolean::<DefaultBooleanMapping>::new(false);

Change the mapping of this boolean.

Examples

Change the mapping for a given Boolean:

let es_boolean = Boolean::<DefaultBooleanMapping>::new(true);
    
let boolean: Boolean<MyBooleanMapping> = es_boolean.remap();

Trait Implementations

impl<M> Default for Boolean<M> where
    M: Default + BooleanMapping
[src]

impl<M> AsRef<bool> for Boolean<M> where
    M: BooleanMapping
[src]

impl<'de, M> Deserialize<'de> for Boolean<M> where
    M: BooleanMapping
[src]

impl<M> Debug for Boolean<M> where
    M: Debug + BooleanMapping
[src]

Formats the value using the given formatter.

impl<M> Serialize for Boolean<M> where
    M: BooleanMapping
[src]

Serialize this value into the given Serde serializer. Read more

impl<M> From<bool> for Boolean<M> where
    M: BooleanMapping
[src]

Performs the conversion.

impl<M> BooleanFieldType<M> for Boolean<M> where
    M: BooleanMapping
[src]

impl<M> PartialEq<bool> for Boolean<M> where
    M: BooleanMapping
[src]

impl<M> PartialEq<Boolean<M>> for Boolean<M> where
    M: PartialEq<M> + BooleanMapping
[src]

impl<M> Deref for Boolean<M> where
    M: BooleanMapping
[src]

The resulting type after dereferencing

The method called to dereference a value

impl<M> Clone for Boolean<M> where
    M: Clone + BooleanMapping
[src]