Struct elastic_types::number::Long
[−]
[src]
pub struct Long<TMapping> where
TMapping: LongMapping, { /* fields omitted */ }
Number type with a given mapping.
Methods
impl<TMapping> Long<TMapping> where
TMapping: LongMapping,
[src]
TMapping: LongMapping,
pub fn new<I: Into<i64>>(num: I) -> Long<TMapping>
[src]
Creates a new number with the given mapping.
pub fn remap<TNewMapping>(number: Long<TMapping>) -> Long<TNewMapping> where
TNewMapping: LongMapping,
[src]
TNewMapping: LongMapping,
Change the mapping of this number.
Methods from Deref<Target = i64>
Trait Implementations
impl<TMapping: Debug> Debug for Long<TMapping> where
TMapping: LongMapping,
[src]
TMapping: LongMapping,
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<TMapping: Default> Default for Long<TMapping> where
TMapping: LongMapping,
[src]
TMapping: LongMapping,
impl<TMapping: Clone> Clone for Long<TMapping> where
TMapping: LongMapping,
[src]
TMapping: LongMapping,
fn clone(&self) -> Long<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 Long<TMapping> where
TMapping: LongMapping,
[src]
TMapping: LongMapping,
fn eq(&self, __arg_0: &Long<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: &Long<TMapping>) -> bool
[src]
This method tests for !=
.
impl<TMapping> LongFieldType<TMapping> for Long<TMapping> where
TMapping: LongMapping,
[src]
TMapping: LongMapping,
impl<M> From<i64> for Long<M> where
M: LongMapping,
[src]
M: LongMapping,
impl<M> PartialEq<i64> for Long<M> where
M: LongMapping,
[src]
M: LongMapping,
fn eq(&self, other: &i64) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &i64) -> bool
[src]
This method tests for !=
.
impl<M> PartialEq<Long<M>> for i64 where
M: LongMapping,
[src]
M: LongMapping,
fn eq(&self, other: &Long<M>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Long<M>) -> bool
[src]
This method tests for !=
.
impl<M> Deref for Long<M> where
M: LongMapping,
[src]
M: LongMapping,
type Target = i64
The resulting type after dereferencing.
fn deref(&self) -> &i64
[src]
Dereferences the value.
impl<M> Borrow<i64> for Long<M> where
M: LongMapping,
[src]
M: LongMapping,
impl<TMapping> Serialize for Long<TMapping> where
TMapping: LongMapping,
[src]
TMapping: LongMapping,
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 Long<TMapping> where
TMapping: LongMapping,
[src]
TMapping: LongMapping,
fn deserialize<D>(deserializer: D) -> Result<Long<TMapping>, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more