Struct elastic_types::number::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: Into<i32>>(num: I) -> Integer<TMapping>
[src]
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: Debug> Debug for Integer<TMapping> where
TMapping: IntegerMapping,
[src]
TMapping: IntegerMapping,
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<TMapping: Default> Default for Integer<TMapping> where
TMapping: IntegerMapping,
[src]
TMapping: IntegerMapping,
impl<TMapping: Clone> Clone for Integer<TMapping> where
TMapping: IntegerMapping,
[src]
TMapping: 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: PartialEq> PartialEq for Integer<TMapping> where
TMapping: IntegerMapping,
[src]
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<TMapping> IntegerFieldType<TMapping> for Integer<TMapping> where
TMapping: IntegerMapping,
[src]
TMapping: IntegerMapping,
impl<M> From<i32> for Integer<M> where
M: IntegerMapping,
[src]
M: IntegerMapping,
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<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::Ok, S::Error> where
S: Serializer,
[src]
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<'de, TMapping> Deserialize<'de> for Integer<TMapping> where
TMapping: IntegerMapping,
[src]
TMapping: IntegerMapping,
fn deserialize<D>(deserializer: D) -> Result<Integer<TMapping>, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more