pub struct NoStorage;
Expand description
a placeholder storage that doesn’t store segment
Trait Implementations§
Source§impl Storage for NoStorage
impl Storage for NoStorage
type Config = ()
type Segment = SealedSegment<File>
Source§fn store(
&self,
_namespace: &NamespaceName,
_seg: Self::Segment,
_config: Option<Self::Config>,
_on_store: OnStoreCallback,
)
fn store( &self, _namespace: &NamespaceName, _seg: Self::Segment, _config: Option<Self::Config>, _on_store: OnStoreCallback, )
store the passed segment for
namespace
. This function is called in a context where
blocking is acceptable.
returns a future that resolves when the segment is stored
The segment should be stored whether or not the future is polled.async fn durable_frame_no( &self, _namespace: &NamespaceName, _config: Option<Self::Config>, ) -> Result<u64>
async fn restore( &self, _file: impl FileExt, _namespace: &NamespaceName, _restore_options: RestoreOptions, _config_override: Option<Self::Config>, ) -> Result<()>
async fn find_segment( &self, _namespace: &NamespaceName, _frame_no: FindSegmentReq, _config_override: Option<Self::Config>, ) -> Result<SegmentKey>
async fn fetch_segment_index( &self, _namespace: &NamespaceName, _key: &SegmentKey, _config_override: Option<Self::Config>, ) -> Result<Map<Arc<[u8]>>>
async fn fetch_segment_data( &self, _namespace: &NamespaceName, _key: &SegmentKey, _config_override: Option<Self::Config>, ) -> Result<CompactedSegment<impl FileExt>>
fn list_segments<'a>( &'a self, _namespace: &'a NamespaceName, _until: u64, _config_override: Option<Self::Config>, ) -> impl Stream<Item = Result<SegmentInfo>> + 'a
fn shutdown(&self) -> impl Future<Output = ()> + Send
impl Copy for NoStorage
Auto Trait Implementations§
impl Freeze for NoStorage
impl RefUnwindSafe for NoStorage
impl Send for NoStorage
impl Sync for NoStorage
impl Unpin for NoStorage
impl UnwindSafe for NoStorage
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreCreates a shared type from an unshared type.