pub type F32 = OrderedFloat<f32>;Expand description
A 32-bit floating point type with total order.
Aliased Type§
#[repr(transparent)]pub struct F32(pub f32);Tuple Fields§
§0: f32Trait Implementations§
Source§impl FromIntoArrow for F32
impl FromIntoArrow for F32
Source§impl FromIntoArrow for F32
impl FromIntoArrow for F32
Source§impl HashKeySer<'_> for F32
impl HashKeySer<'_> for F32
Source§fn serialize_into(self, buf: impl BufMut)
fn serialize_into(self, buf: impl BufMut)
Serialize the scalar into the given buffer.
Source§fn exact_size() -> Option<usize>
fn exact_size() -> Option<usize>
Returns
Some if the serialized size is known for this scalar type.Source§fn estimated_size(self) -> usize
fn estimated_size(self) -> usize
Returns the estimated serialized size for this scalar.
Source§impl NativeType for F32
impl NativeType for F32
fn to_protobuf<T: Write>(self, output: &mut T) -> ArrayResult<usize>
Source§impl PrimitiveArrayItemType for F32
impl PrimitiveArrayItemType for F32
Source§fn erase_array_type(arr: PrimitiveArray<Self>) -> ArrayImpl
fn erase_array_type(arr: PrimitiveArray<Self>) -> ArrayImpl
A helper to convert a primitive array to
ArrayImpl.Source§fn try_into_array(arr: ArrayImpl) -> Option<PrimitiveArray<Self>>
fn try_into_array(arr: ArrayImpl) -> Option<PrimitiveArray<Self>>
A helper to convert
ArrayImpl to self.Source§fn try_into_array_ref(arr: &ArrayImpl) -> Option<&PrimitiveArray<Self>>
fn try_into_array_ref(arr: &ArrayImpl) -> Option<&PrimitiveArray<Self>>
A helper to convert
ArrayImpl to self.Source§fn array_type() -> ArrayType
fn array_type() -> ArrayType
Returns array type of the primitive array
fn to_protobuf<T: Write>(self, output: &mut T) -> ArrayResult<usize>
fn from_protobuf(cur: &mut Cursor<&[u8]>) -> ArrayResult<Self>
Source§impl Scalar for F32
impl Scalar for F32
Source§type ScalarRefType<'a> = OrderedFloat<f32>
type ScalarRefType<'a> = OrderedFloat<f32>
Type for reference of
ScalarSource§fn as_scalar_ref(&self) -> Self
fn as_scalar_ref(&self) -> Self
Get a reference to current scalar.
fn to_scalar_value(self) -> ScalarImpl
Source§impl<'scalar> ScalarRef<'scalar> for F32
impl<'scalar> ScalarRef<'scalar> for F32
Source§type ScalarType = OrderedFloat<f32>
type ScalarType = OrderedFloat<f32>
ScalarType is the owned type of current ScalarRef.Source§fn to_owned_scalar(&self) -> Self
fn to_owned_scalar(&self) -> Self
Convert
ScalarRef to an owned scalar.Source§fn hash_scalar<H: Hasher>(&self, state: &mut H)
fn hash_scalar<H: Hasher>(&self, state: &mut H)
A wrapped hash function to get the hash value for this scaler.
Source§impl ToBinary for F32
impl ToBinary for F32
fn to_binary_with_type(&self, ty: &DataType) -> Result<Bytes, ToBinaryError>
Source§impl ToText for F32
impl ToText for F32
Source§fn write<W: Write>(&self, f: &mut W) -> Result
fn write<W: Write>(&self, f: &mut W) -> Result
Write the text to the writer regardless of its data type Read more
Source§fn write_with_type<W: Write>(&self, ty: &DataType, f: &mut W) -> Result
fn write_with_type<W: Write>(&self, ty: &DataType, f: &mut W) -> Result
Write the text to the writer according to its data type
Source§fn to_text_with_type(&self, ty: &DataType) -> String
fn to_text_with_type(&self, ty: &DataType) -> String
Convert to text according to its data type
Source§fn to_text(&self) -> String
fn to_text(&self) -> String
to_text is a special version of to_text_with_type, it convert the scalar to default type
text. E.g. for Int64, it will convert to text as a Int64 type.
We should prefer to use to_text_with_type because it’s more clear and readable. Read moreSource§fn text_display(&self) -> impl Display + '_
fn text_display(&self) -> impl Display + '_
Returns an displayable wrapper implemented with
ToText::write.Source§impl TryFrom<ScalarImpl> for F32
impl TryFrom<ScalarImpl> for F32
Source§type Error = ArrayError
type Error = ArrayError
The type returned in the event of a conversion error.
Source§fn try_from(val: ScalarImpl) -> ArrayResult<Self>
fn try_from(val: ScalarImpl) -> ArrayResult<Self>
Performs the conversion.
Source§impl<'scalar> TryFrom<ScalarRefImpl<'scalar>> for F32
impl<'scalar> TryFrom<ScalarRefImpl<'scalar>> for F32
Source§type Error = ArrayError
type Error = ArrayError
The type returned in the event of a conversion error.
Source§fn try_from(val: ScalarRefImpl<'scalar>) -> ArrayResult<Self>
fn try_from(val: ScalarRefImpl<'scalar>) -> ArrayResult<Self>
Performs the conversion.
Source§impl<'a> WithDataType for &'a F32
impl<'a> WithDataType for &'a F32
Source§fn default_data_type() -> DataType
fn default_data_type() -> DataType
Returns the most obvious
DataType for the rust type.Source§impl<'a> WithDataType for &'a mut F32
impl<'a> WithDataType for &'a mut F32
Source§fn default_data_type() -> DataType
fn default_data_type() -> DataType
Returns the most obvious
DataType for the rust type.Source§impl WithDataType for Box<F32>
impl WithDataType for Box<F32>
Source§fn default_data_type() -> DataType
fn default_data_type() -> DataType
Returns the most obvious
DataType for the rust type.Source§impl WithDataType for F32
impl WithDataType for F32
Source§fn default_data_type() -> DataType
fn default_data_type() -> DataType
Returns the most obvious
DataType for the rust type.