Struct elastic::types::prelude::Integer
[−]
[src]
pub struct Integer<TMapping> where
TMapping: IntegerMapping, { /* fields omitted */ }
Number type with a given mapping.
Methods
impl<TMapping> Integer<TMapping> where
TMapping: IntegerMapping,
[src]
TMapping: IntegerMapping,
pub fn new<I>(num: I) -> Integer<TMapping> where
I: Into<i32>,
[src]
I: Into<i32>,
Creates a new number with the given mapping.
pub fn remap<TNewMapping>(number: Integer<TMapping>) -> Integer<TNewMapping> where
TNewMapping: IntegerMapping,
[src]
TNewMapping: IntegerMapping,
Change the mapping of this number.
Methods from Deref<Target = i32>
Trait Implementations
impl<TMapping> PartialEq<Integer<TMapping>> for Integer<TMapping> where
TMapping: PartialEq<TMapping> + IntegerMapping,
[src]
TMapping: PartialEq<TMapping> + IntegerMapping,
fn eq(&self, __arg_0: &Integer<TMapping>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Integer<TMapping>) -> bool
[src]
This method tests for !=
.
impl<M> PartialEq<i32> for Integer<M> where
M: IntegerMapping,
[src]
M: IntegerMapping,
fn eq(&self, other: &i32) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &i32) -> bool
[src]
This method tests for !=
.
impl<M> PartialEq<Integer<M>> for i32 where
M: IntegerMapping,
[src]
M: IntegerMapping,
fn eq(&self, other: &Integer<M>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Integer<M>) -> bool
[src]
This method tests for !=
.
impl<TMapping> Clone for Integer<TMapping> where
TMapping: Clone + IntegerMapping,
[src]
TMapping: Clone + IntegerMapping,
fn clone(&self) -> Integer<TMapping>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<TMapping> Default for Integer<TMapping> where
TMapping: Default + IntegerMapping,
[src]
TMapping: Default + IntegerMapping,
impl<'de, TMapping> Deserialize<'de> for Integer<TMapping> where
TMapping: IntegerMapping,
[src]
TMapping: IntegerMapping,
fn deserialize<D>(
deserializer: D
) -> Result<Integer<TMapping>, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
[src]
deserializer: D
) -> Result<Integer<TMapping>, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<TMapping> IntegerFieldType<TMapping> for Integer<TMapping> where
TMapping: IntegerMapping,
[src]
TMapping: IntegerMapping,
impl<M> Deref for Integer<M> where
M: IntegerMapping,
[src]
M: IntegerMapping,
type Target = i32
The resulting type after dereferencing.
fn deref(&self) -> &i32
[src]
Dereferences the value.
impl<M> Borrow<i32> for Integer<M> where
M: IntegerMapping,
[src]
M: IntegerMapping,
impl<TMapping> Serialize for Integer<TMapping> where
TMapping: IntegerMapping,
[src]
TMapping: IntegerMapping,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
[src]
&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
impl<M> From<i32> for Integer<M> where
M: IntegerMapping,
[src]
M: IntegerMapping,
impl<TMapping> Debug for Integer<TMapping> where
TMapping: Debug + IntegerMapping,
[src]
TMapping: Debug + IntegerMapping,