Skip to main content

LocalDataStore

Struct LocalDataStore 

Source
pub struct LocalDataStore { /* private fields */ }
Expand description

Local filesystem data store.

Implementations§

Source§

impl LocalDataStore

Source

pub fn new(base_path: impl Into<PathBuf>) -> Self

Trait Implementations§

Source§

impl DataStore for LocalDataStore

Source§

fn put(&self, key: &CacheKey, data: &Value) -> Result<DataRef>

Store data and return a reference to it.
Source§

fn get(&self, data_ref: &DataRef) -> Result<Value>

Retrieve data from a reference.
Source§

fn exists(&self, data_ref: &DataRef) -> Result<bool>

Check if data exists at a reference.
Source§

fn remove(&self, data_ref: &DataRef) -> Result<()>

Delete data at a reference.
Source§

fn config(&self) -> &StorageConfig

Get the storage config.
Source§

fn get_rows( &self, data_ref: &DataRef, start: usize, len: usize, ) -> Result<Value>

Read a range of rows [start..start+len) from a tensor. Returns a Value::Tensor with shape[0] == len. Default impl downloads the full value and slices in memory.
Source§

fn meta(&self, data_ref: &DataRef) -> Result<StoreMeta>

Get metadata about a stored value without reading the data. Default impl downloads the full value to extract metadata.

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> 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> Same for T

Source§

type Output = T

Should always be Self
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.