#[non_exhaustive]pub enum RestoreError {
Show 18 variants
InvalidArgument(String),
LogDirNotEmpty(PathBuf),
EmptyArchive {
prefix: String,
},
ChecksumMismatch {
key: String,
position: u64,
expected: u32,
computed: u32,
},
TruncatedSegment {
key: String,
position: u64,
declared: u64,
available: u64,
},
TornCopy {
topic: String,
partition: i32,
segment_id: Uuid,
artifact: String,
},
Authenticity {
reason: String,
},
Integrity(String),
MetadataDisagreement {
topic: String,
partition: i32,
scanned: String,
snapshot: String,
},
MetadataSnapshot {
path: PathBuf,
reason: String,
},
MetadataSnapshotTopicMismatch {
topic: String,
archive_topic_id: Uuid,
snapshot_topic_id: String,
},
UnknownPartition {
topic: String,
partition: i32,
},
Format {
code: i32,
},
RemoteStorage(RemoteStorageError),
ObjectStore(ObjectStoreError),
Log(LogError),
Records(RecordsError),
Io(Error),
}Expand description
Every way a point-in-time restore stops.
The variants keep the object key, the byte position, and the partition that
identify the failure, because an operator who runs a restore during an
incident has to decide whether to re-run with --continue-on-corrupt or to
go back to the archive. A message alone does not support that decision.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidArgument(String)
A flag combination the parser accepts but the restore cannot act on.
LogDirNotEmpty(PathBuf)
--log-dir names a directory that already holds entries. A restore
writes a complete cluster, so it never merges into existing state.
EmptyArchive
The scan reached the archive but found no segment for any selected
topic. A wrong --archive-prefix reads exactly like an empty bucket,
so the message carries the prefix that was searched.
ChecksumMismatch
A batch header’s CRC does not match the bytes that follow it.
Fields
TruncatedSegment
A segment ends part way through a batch. The archived copy is short of the length its last batch header declares.
Fields
TornCopy
A segment copy stopped part way: the archive holds some of the segment’s artifacts and not the rest.
Fields
Authenticity
Trusted WORM evidence did not authenticate an archive object or chain.
Integrity(String)
Captured diskless-WAL state or a required object is inconsistent.
MetadataDisagreement
The bucket scan and the --rlmm-snapshot do not agree about a
partition. One of the two is stale, and a restore must not pick for the
operator.
Fields
MetadataSnapshot
A controller metadata snapshot could not be decoded.
MetadataSnapshotTopicMismatch
A topic configuration belongs to a different incarnation of an archived topic, or cannot be tied to one at all.
Fields
UnknownPartition
A bound names a topic partition the archive does not hold. Left unreported this silently restores the partition whole, which is the opposite of what the operator asked for.
Format
The formatter refused to format the target log directory.
RemoteStorage(RemoteStorageError)
The tiered-storage layer failed.
ObjectStore(ObjectStoreError)
The object store failed, or its configuration was rejected.
Log(LogError)
The target log failed to accept a rehydrated segment.
Records(RecordsError)
A record batch would not decode or re-encode.
Io(Error)
A local filesystem operation failed.
Implementations§
Source§impl RestoreError
impl RestoreError
Trait Implementations§
Source§impl Debug for RestoreError
impl Debug for RestoreError
Source§impl Display for RestoreError
impl Display for RestoreError
Source§impl Error for RestoreError
impl Error for RestoreError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<Error> for RestoreError
impl From<Error> for RestoreError
Source§impl From<LogError> for RestoreError
impl From<LogError> for RestoreError
Source§impl From<ObjectStoreError> for RestoreError
impl From<ObjectStoreError> for RestoreError
Source§impl From<RecordsError> for RestoreError
impl From<RecordsError> for RestoreError
Source§impl From<RemoteStorageError> for RestoreError
impl From<RemoteStorageError> for RestoreError
Source§fn from(source: RemoteStorageError) -> Self
fn from(source: RemoteStorageError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for RestoreError
impl !UnwindSafe for RestoreError
impl Freeze for RestoreError
impl Send for RestoreError
impl Sync for RestoreError
impl Unpin for RestoreError
impl UnsafeUnpin for RestoreError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<F> FnGhost for F
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
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> ⓘ
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 more§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling [Attribute] value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi [Quirk] value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the [Condition] value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);