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