Struct zarrs::group::GroupMetadataV3
source · pub struct GroupMetadataV3 {
pub zarr_format: usize,
pub node_type: String,
pub attributes: Map<String, Value>,
pub additional_fields: AdditionalFields,
}
Expand description
Zarr group metadata (storage specification v3).
See https://zarr-specs.readthedocs.io/en/latest/v3/core/v3.0.html#group-metadata.
An example JSON
document for an explicit v3 group:
{
"zarr_format": 3,
"node_type": "group",
"attributes": {
"spam": "ham",
"eggs": 42,
}
}
Fields§
§zarr_format: usize
An integer defining the version of the storage specification to which the array store adheres. Must be 3
.
node_type: String
A string defining the type of hierarchy node element, must be group
here.
attributes: Map<String, Value>
Optional user metadata.
additional_fields: AdditionalFields
Additional fields.
Implementations§
source§impl GroupMetadataV3
impl GroupMetadataV3
sourcepub fn new(
attributes: Map<String, Value>,
additional_fields: AdditionalFields
) -> Self
pub fn new( attributes: Map<String, Value>, additional_fields: AdditionalFields ) -> Self
Create group metadata.
sourcepub const fn validate_format(&self) -> bool
pub const fn validate_format(&self) -> bool
Validates that the zarr_format
field is 3
.
sourcepub fn validate_node_type(&self) -> bool
pub fn validate_node_type(&self) -> bool
Validates that the node_type
is "group"
.
Trait Implementations§
source§impl Clone for GroupMetadataV3
impl Clone for GroupMetadataV3
source§fn clone(&self) -> GroupMetadataV3
fn clone(&self) -> GroupMetadataV3
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for GroupMetadataV3
impl Debug for GroupMetadataV3
source§impl Default for GroupMetadataV3
impl Default for GroupMetadataV3
source§impl<'de> Deserialize<'de> for GroupMetadataV3
impl<'de> Deserialize<'de> for GroupMetadataV3
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for GroupMetadataV3
impl Display for GroupMetadataV3
source§impl From<GroupMetadataV3> for GroupMetadata
impl From<GroupMetadataV3> for GroupMetadata
source§fn from(original: GroupMetadataV3) -> GroupMetadata
fn from(original: GroupMetadataV3) -> GroupMetadata
Converts to this type from the input type.
source§impl PartialEq for GroupMetadataV3
impl PartialEq for GroupMetadataV3
source§fn eq(&self, other: &GroupMetadataV3) -> bool
fn eq(&self, other: &GroupMetadataV3) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for GroupMetadataV3
impl Serialize for GroupMetadataV3
impl Eq for GroupMetadataV3
impl StructuralPartialEq for GroupMetadataV3
Auto Trait Implementations§
impl Freeze for GroupMetadataV3
impl RefUnwindSafe for GroupMetadataV3
impl Send for GroupMetadataV3
impl Sync for GroupMetadataV3
impl Unpin for GroupMetadataV3
impl UnwindSafe for GroupMetadataV3
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.