Skip to main content

NumpyDateTime64DataType

Struct NumpyDateTime64DataType 

Source
pub struct NumpyDateTime64DataType {
    pub unit: NumpyTimeUnit,
    pub scale_factor: NonZeroU32,
}
Expand description

The numpy.datetime64 data type.

Fields§

§unit: NumpyTimeUnit

The NumPy temporal unit.

§scale_factor: NonZeroU32

The NumPy temporal scale factor.

Implementations§

Source§

impl NumpyDateTime64DataType

Source

pub const fn new(unit: NumpyTimeUnit, scale_factor: NonZeroU32) -> Self

Create a new numpy.datetime64 data type.

Trait Implementations§

Source§

impl BitroundDataTypeTraits for NumpyDateTime64DataType

Source§

fn mantissa_bits(&self) -> Option<u32>

The number of bits to round to for floating point types. Read more
Source§

fn round(&self, bytes: &mut [u8], keepbits: u32)

Apply bit rounding to the bytes in-place. Read more
Source§

impl BytesDataTypeTraits for NumpyDateTime64DataType

Source§

fn encode<'a>( &self, bytes: Cow<'a, [u8]>, endianness: Option<Endianness>, ) -> Result<Cow<'a, [u8]>, BytesCodecEndiannessMissingError>

Encode the bytes of a fixed-size data type to a specified endianness for the bytes codec. Read more
Source§

fn decode<'a>( &self, bytes: Cow<'a, [u8]>, endianness: Option<Endianness>, ) -> Result<Cow<'a, [u8]>, BytesCodecEndiannessMissingError>

Decode the bytes of a fixed-size data type from a specified endianness for the bytes codec. Read more
Source§

impl Clone for NumpyDateTime64DataType

Source§

fn clone(&self) -> NumpyDateTime64DataType

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl DataTypeTraits for NumpyDateTime64DataType

Source§

fn configuration(&self, _version: ZarrVersion) -> Configuration

The configuration of the data type.
Source§

fn size(&self) -> DataTypeSize

The size of the data type. Read more
Source§

fn fill_value( &self, fill_value_metadata: &FillValueMetadata, _version: ZarrVersion, ) -> Result<FillValue, DataTypeFillValueMetadataError>

Create a fill value from metadata. Read more
Source§

fn metadata_fill_value( &self, fill_value: &FillValue, ) -> Result<FillValueMetadata, DataTypeFillValueError>

Create fill value metadata. Read more
Source§

fn as_any(&self) -> &dyn Any

Returns self as Any for downcasting. Read more
Source§

fn compatible_element_types(&self) -> &'static [TypeId]

Returns the set of Rust element types this data type is compatible with. Read more
Source§

fn configuration_v3(&self) -> Configuration

The Zarr V3 configuration of the data type.
Source§

fn configuration_v2(&self) -> Configuration

The Zarr V2 configuration of the data type.
Source§

fn fill_value_v2( &self, fill_value_metadata: &FillValueMetadataV3, ) -> Result<FillValue, DataTypeFillValueMetadataError>

Create a fill value from Zarr V2 metadata. Read more
Source§

fn fill_value_v3( &self, fill_value_metadata: &FillValueMetadataV3, ) -> Result<FillValue, DataTypeFillValueMetadataError>

Create a fill value from Zarr V3 metadata. Read more
Source§

fn eq(&self, other: &dyn DataTypeTraits) -> bool

Compare this data type with another for equality. Read more
Source§

impl DataTypeTraitsV3 for NumpyDateTime64DataType

Source§

fn create(metadata: &MetadataV3) -> Result<DataType, PluginCreateError>

Create a data type from Zarr V3 metadata. Read more
Source§

impl Debug for NumpyDateTime64DataType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl ExtensionAliases<ZarrVersion2> for NumpyDateTime64DataType

Source§

fn aliases() -> RwLockReadGuard<'static, ExtensionAliasesConfig>

Get a read lock on the aliases configuration for this version.
Source§

fn aliases_mut() -> RwLockWriteGuard<'static, ExtensionAliasesConfig>

Get a write lock on the aliases configuration for this version.
Source§

fn matches_name(_name: &str) -> bool

Check if the given name matches this extension’s identifier or any of its aliases for the given Zarr version. Read more
Source§

impl ExtensionAliases<ZarrVersion3> for NumpyDateTime64DataType

Source§

fn aliases() -> RwLockReadGuard<'static, ExtensionAliasesConfig>

Get a read lock on the aliases configuration for this version.
Source§

fn aliases_mut() -> RwLockWriteGuard<'static, ExtensionAliasesConfig>

Get a write lock on the aliases configuration for this version.
Source§

fn matches_name(name: &str) -> bool

Check if the given name matches this extension’s identifier or any of its aliases for the given Zarr version. Read more
Source§

impl ExtensionNameStatic for NumpyDateTime64DataType

Source§

const DEFAULT_NAME_FN: fn(ZarrVersion) -> Option<Cow<'static, str>>

Function pointer to get the default name for a given Zarr version. Read more
Source§

impl PackBitsDataTypeTraits for NumpyDateTime64DataType

Source§

fn component_size_bits(&self) -> u64

The component size in bits.
Source§

fn num_components(&self) -> u64

The number of components.
Source§

fn sign_extension(&self) -> bool

True if the components need sign extension. Read more
Source§

impl PartialEq for NumpyDateTime64DataType

Source§

fn eq(&self, other: &NumpyDateTime64DataType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PcodecDataTypeTraits for NumpyDateTime64DataType

Source§

fn pcodec_element_type(&self) -> PcodecElementType

Returns the pcodec element type for this data type.
Source§

fn pcodec_elements_per_element(&self) -> usize

Returns the number of elements per data type element.
Source§

impl ZfpDataTypeTraits for NumpyDateTime64DataType

Source§

fn zfp_encoding(&self) -> ZfpEncoding

Returns the zfp encoding strategy for this data type.
Source§

impl Copy for NumpyDateTime64DataType

Source§

impl Eq for NumpyDateTime64DataType

Source§

impl StructuralPartialEq for NumpyDateTime64DataType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> ExtensionAliasesV2 for T

Source§

fn aliases_v2() -> RwLockReadGuard<'static, ExtensionAliasesConfig>

Get a read lock on the V2 aliases configuration.
Source§

fn aliases_v2_mut() -> RwLockWriteGuard<'static, ExtensionAliasesConfig>

Get a write lock on the V2 aliases configuration.
Source§

fn matches_name_v2(name: &str) -> bool

Check if the given name matches this extension for Zarr V2.
Source§

impl<T> ExtensionAliasesV3 for T

Source§

fn aliases_v3() -> RwLockReadGuard<'static, ExtensionAliasesConfig>

Get a read lock on the V3 aliases configuration.
Source§

fn aliases_v3_mut() -> RwLockWriteGuard<'static, ExtensionAliasesConfig>

Get a write lock on the V3 aliases configuration.
Source§

fn matches_name_v3(name: &str) -> bool

Check if the given name matches this extension for Zarr V3.
Source§

impl<T> ExtensionName for T

Source§

fn name(&self, version: ZarrVersion) -> Option<Cow<'static, str>>

Get the name for this extension instance for the given Zarr version. Read more
Source§

fn name_v3(&self) -> Option<Cow<'static, str>>

Get the name for this extension instance for Zarr V3. Read more
Source§

fn name_v2(&self) -> Option<Cow<'static, str>>

Get the name for this extension instance for Zarr V2. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.