pub struct ZarrArray { /* private fields */ }Expand description
A Zarr v3 array opened on the filesystem.
Implementations§
Source§impl ZarrArray
impl ZarrArray
Sourcepub fn read_all<T: ElementOwned>(&self) -> StorageResult<Vec<T>>
pub fn read_all<T: ElementOwned>(&self) -> StorageResult<Vec<T>>
Read every element, row-major.
Sourcepub fn read_subset<T: ElementOwned>(
&self,
ranges: &[Range<u64>],
) -> StorageResult<Vec<T>>
pub fn read_subset<T: ElementOwned>( &self, ranges: &[Range<u64>], ) -> StorageResult<Vec<T>>
Read a hyperrectangular subset, row-major.
Sourcepub fn write_subset<T: Element>(
&mut self,
ranges: &[Range<u64>],
values: &[T],
) -> StorageResult<()>
pub fn write_subset<T: Element>( &mut self, ranges: &[Range<u64>], values: &[T], ) -> StorageResult<()>
Write a hyperrectangular subset, row-major (the counterpart of
Self::read_subset). Only the touched chunks are stored.
Sourcepub fn append<T: Element>(&mut self, values: &[T]) -> StorageResult<()>
pub fn append<T: Element>(&mut self, values: &[T]) -> StorageResult<()>
Append elements along the leading axis: resize, persist the new shape, then write the tail. Values must tile the trailing extent.
Accepted crash window (Python parity, #5 review): the resized shape is published before the tail data lands, so a crash in between leaves zero-filled phantom rows visible to readers.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ZarrArray
impl !UnwindSafe for ZarrArray
impl Freeze for ZarrArray
impl Send for ZarrArray
impl Sync for ZarrArray
impl Unpin for ZarrArray
impl UnsafeUnpin for ZarrArray
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.