pub struct DumbSnapshotter { /* private fields */ }
Expand description
Snapshotter that does nothing. It is mainly used for test purposes.
Implementations§
Source§impl DumbSnapshotter
impl DumbSnapshotter
Sourcepub fn new(compression_algorithm: CompressionAlgorithm) -> Self
pub fn new(compression_algorithm: CompressionAlgorithm) -> Self
Create a new instance of DumbSnapshotter.
The compression_algorithm
parameter is used for the output file name extension.
Sourcepub fn with_archive_size(self, size: u64) -> Self
pub fn with_archive_size(self, size: u64) -> Self
Set the size assigned to the produced snapshots.
Sourcepub fn get_last_snapshot(&self) -> StdResult<Option<FileArchive>>
pub fn get_last_snapshot(&self) -> StdResult<Option<FileArchive>>
Return the last fake snapshot produced.
Trait Implementations§
Source§impl Default for DumbSnapshotter
impl Default for DumbSnapshotter
Source§impl Snapshotter for DumbSnapshotter
impl Snapshotter for DumbSnapshotter
Source§fn snapshot_all_completed_immutables<'life0, 'life1, 'async_trait>(
&'life0 self,
archive_name_without_extension: &'life1 str,
) -> Pin<Box<dyn Future<Output = StdResult<FileArchive>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn snapshot_all_completed_immutables<'life0, 'life1, 'async_trait>(
&'life0 self,
archive_name_without_extension: &'life1 str,
) -> Pin<Box<dyn Future<Output = StdResult<FileArchive>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Create a new snapshot containing all completed immutables.
Source§fn snapshot_ancillary<'life0, 'life1, 'async_trait>(
&'life0 self,
_immutable_file_number: ImmutableFileNumber,
archive_name_without_extension: &'life1 str,
) -> Pin<Box<dyn Future<Output = StdResult<FileArchive>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn snapshot_ancillary<'life0, 'life1, 'async_trait>(
&'life0 self,
_immutable_file_number: ImmutableFileNumber,
archive_name_without_extension: &'life1 str,
) -> Pin<Box<dyn Future<Output = StdResult<FileArchive>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Create a new snapshot of ancillary files. Read more
Source§fn snapshot_immutable_trio<'life0, 'life1, 'async_trait>(
&'life0 self,
_immutable_file_number: ImmutableFileNumber,
archive_name_without_extension: &'life1 str,
) -> Pin<Box<dyn Future<Output = StdResult<FileArchive>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn snapshot_immutable_trio<'life0, 'life1, 'async_trait>(
&'life0 self,
_immutable_file_number: ImmutableFileNumber,
archive_name_without_extension: &'life1 str,
) -> Pin<Box<dyn Future<Output = StdResult<FileArchive>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Create a new snapshot of an immutable trio.
Source§fn compute_immutable_files_total_uncompressed_size<'life0, 'async_trait>(
&'life0 self,
_up_to_immutable_file_number: ImmutableFileNumber,
) -> Pin<Box<dyn Future<Output = StdResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn compute_immutable_files_total_uncompressed_size<'life0, 'async_trait>(
&'life0 self,
_up_to_immutable_file_number: ImmutableFileNumber,
) -> Pin<Box<dyn Future<Output = StdResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Compute the total and average uncompressed size of all immutables up to the given immutable
file number.
Source§fn compression_algorithm(&self) -> CompressionAlgorithm
fn compression_algorithm(&self) -> CompressionAlgorithm
Return the compression algorithm used by the snapshotter.
Auto Trait Implementations§
impl !Freeze for DumbSnapshotter
impl RefUnwindSafe for DumbSnapshotter
impl Send for DumbSnapshotter
impl Sync for DumbSnapshotter
impl Unpin for DumbSnapshotter
impl UnwindSafe for DumbSnapshotter
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> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 moreSource§impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
Source§fn lossless_try_into(self) -> Option<Dst>
fn lossless_try_into(self) -> Option<Dst>
Performs the conversion.
Source§impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
Source§fn lossy_into(self) -> Dst
fn lossy_into(self) -> Dst
Performs the conversion.
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
Source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
Source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
Source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
Source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.