pub struct ColdStore { /* private fields */ }Implementations§
Source§impl ColdStore
impl ColdStore
pub fn memory() -> Result<Self>
Sourcepub fn try_new(config: &ColdConfig) -> Result<Self>
pub fn try_new(config: &ColdConfig) -> Result<Self>
Build a ColdStore from an explicit ColdConfig.
The bootstrap layer assembles the typed config before calling this method;
this method is purely functional — it does not touch std::env.
Returns Err when the backend is ColdBackend::None;
the caller should skip construction when cold storage is disabled.
pub fn info(&self) -> &ColdStoreInfo
pub fn with_read_cache(self, config: ColdReadCacheParams) -> Self
pub fn without_read_cache(self) -> Self
pub fn set_observer( &self, observer: impl Fn(ColdStoreEvent) + Send + Sync + 'static, )
pub fn set_fault_policy( &self, policy: impl Fn(&ColdStoreFaultContext) -> Option<ColdStoreFaultEffect> + Send + Sync + 'static, )
pub fn clear_fault_policy(&self)
pub fn set_delay_fn<F, Fut>(&self, delay_fn: F)
pub async fn write_chunk(&self, path: &str, payload: &[u8]) -> Result<u64>
pub async fn delete_chunk(&self, path: &str) -> Result<()>
pub async fn remove_all(&self, path: &str) -> Result<()>
pub async fn read_chunk_range( &self, chunk: &ColdChunkRef, read_start_offset: u64, len: usize, ) -> Result<Vec<u8>>
pub async fn read_object_range_for_stream( &self, stream_id: &BucketStreamId, object: &ObjectPayloadRef, read_start_offset: u64, len: usize, ) -> Result<Vec<u8>>
pub async fn read_object_range( &self, object: &ObjectPayloadRef, read_start_offset: u64, len: usize, ) -> Result<Vec<u8>>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ColdStore
impl !UnwindSafe for ColdStore
impl Freeze for ColdStore
impl Send for ColdStore
impl Sync for ColdStore
impl Unpin for ColdStore
impl UnsafeUnpin for ColdStore
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