Struct elastic::types::number::prelude::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>(num: I) -> Float<TMapping> where
I: Into<f32>,
[src]
I: Into<f32>,
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<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<TMapping> PartialEq<Float<TMapping>> for Float<TMapping> where
TMapping: PartialEq<TMapping> + FloatMapping,
[src]
TMapping: PartialEq<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<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<TMapping> Clone for Float<TMapping> where
TMapping: Clone + FloatMapping,
[src]
TMapping: Clone + 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> Default for Float<TMapping> where
TMapping: Default + FloatMapping,
[src]
TMapping: Default + FloatMapping,
impl<'de, TMapping> Deserialize<'de> for Float<TMapping> where
TMapping: FloatMapping,
[src]
TMapping: FloatMapping,
fn deserialize<D>(
deserializer: D
) -> Result<Float<TMapping>, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
[src]
deserializer: D
) -> Result<Float<TMapping>, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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<TMapping> FloatFieldType<TMapping> for Float<TMapping> where
TMapping: FloatMapping,
[src]
TMapping: FloatMapping,
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 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<f32> for Float<M> where
M: FloatMapping,
[src]
M: FloatMapping,
impl<TMapping> Debug for Float<TMapping> where
TMapping: Debug + FloatMapping,
[src]
TMapping: Debug + FloatMapping,