pub struct Storage { /* private fields */ }Expand description
Wrapper to blosc2_storage
§Example
use blosc2::schunk::Storage;
let storage = Storage::default().set_urlpath("/some/path.blosc2");Implementations§
Source§impl Storage
impl Storage
Sourcepub fn set_urlpath<S: AsRef<Path>>(self, urlpath: S) -> Result<Self>
pub fn set_urlpath<S: AsRef<Path>>(self, urlpath: S) -> Result<Self>
Set url/file path to specify a file-backed schunk.
if not set, defaults to an in-memory schunk
Sourcepub fn get_urlpath(&self) -> Result<Option<&str>>
pub fn get_urlpath(&self) -> Result<Option<&str>>
Reference to the urlpath (if any)
§Example
use blosc2::schunk::Storage;
let storage = Storage::default().set_urlpath("/some/path.blosc2").unwrap();
assert_eq!(storage.get_urlpath().unwrap().unwrap(), "/some/path.blosc2");Sourcepub fn set_contiguous(self, contiguous: bool) -> Self
pub fn set_contiguous(self, contiguous: bool) -> Self
Set the contiguous nature of the schunk.
Sourcepub fn set_cparams(self, cparams: CParams) -> Self
pub fn set_cparams(self, cparams: CParams) -> Self
Set compression parameters
Sourcepub fn get_cparams(&self) -> &CParams
pub fn get_cparams(&self) -> &CParams
Get compression parameters
Sourcepub fn set_dparams(self, dparams: DParams) -> Self
pub fn set_dparams(self, dparams: DParams) -> Self
Set decompression parameters
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Storage
impl RefUnwindSafe for Storage
impl !Send for Storage
impl !Sync for Storage
impl Unpin for Storage
impl UnwindSafe for Storage
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