pub enum MkitError {
Show 30 variants
EmptyData,
InvalidObjectType(u8),
InvalidMagic,
UnsupportedObjectVersion,
UnexpectedEof,
TrailingData,
TooManyEntries,
InvalidEntryName,
InvalidEntryMode(u8),
InvalidEntryOrder,
TooManyParents,
TooManySources,
TagNameInvalid,
TagTargetTypeInvalid(u8),
InvalidSourceOrder,
TooManyChunks,
UnknownIdentityKind(u8),
InvalidIdentity,
IdentityTooLarge,
OversizePayload {
field: &'static str,
len: usize,
},
RngFailure,
SignatureInvalid,
InvalidPublicKey,
InsecureKeyPermissions {
actual: u32,
},
InsecureKeyOwner {
actual: u32,
euid: u32,
},
InsecureKeyDir {
actual: u32,
},
KeyPathIsSymlink(String),
InvalidKeyLength {
actual: usize,
},
KeyIo(String),
DeltaLengthOverflow {
field: &'static str,
len: usize,
},
}Expand description
All decode / validation errors raised by the serialize module, plus a small number of construction-time errors.
Variants§
EmptyData
InvalidObjectType(u8)
InvalidMagic
UnsupportedObjectVersion
UnexpectedEof
TrailingData
TooManyEntries
InvalidEntryName
InvalidEntryMode(u8)
InvalidEntryOrder
TooManyParents
TooManySources
TagNameInvalid
TagTargetTypeInvalid(u8)
InvalidSourceOrder
TooManyChunks
UnknownIdentityKind(u8)
InvalidIdentity
IdentityTooLarge
OversizePayload
A length-prefixed field exceeded the wire-format u32 cap. Only
raised by serialise; deserialise can never observe a value larger
than u32::MAX because it reads the prefix first.
RngFailure
Underlying secure-randomness source could not produce bytes.
SignatureInvalid
Signature verification failed (bad signature, wrong key, tampered input, or wrong domain). The Ed25519 layer never tells us why.
InvalidPublicKey
Public-key bytes do not decode to a valid Edwards point.
InsecureKeyPermissions
Key file on disk has a permission bit set that allows non-owner
access (POSIX mode & 0o077 != 0). Refuses to load.
InsecureKeyOwner
Key file is owned by a different uid than the calling process. Could mean a planted file from a tar extraction or a malicious bind mount. Refuse with the observed uid for diagnostics.
InsecureKeyDir
Parent directory of the key file is group/world-accessible.
.mkit/keys/ MUST be 0700 to keep inotify-style swap attacks
out of reach.
KeyPathIsSymlink(String)
Key path resolves through a symlink. We refuse symlinks at the
open(2) layer (O_NOFOLLOW) — this variant fires when the
kernel returns ELOOP. An attacker who can pre-create the path
as a symlink could otherwise redirect us to a key they control.
InvalidKeyLength
Key file length is not exactly 32 bytes.
KeyIo(String)
Wrapped I/O error from key load/save. Boxed to keep MkitError
variant size small.
DeltaLengthOverflow
Delta encode input exceeds the v1 wire-format u32 length cap
(base or result > 4 GiB - 1). SPEC-PACKFILE holds individual
payloads under this bound, so this is a caller-programming
error, not a normal runtime condition — but saturating instead
of erroring silently produced a stream decode() would reject
with a misleading “length mismatch”.
Trait Implementations§
impl Eq for MkitError
Source§impl Error for MkitError
impl Error for MkitError
1.30.0 · 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<MkitError> for BisectError
impl From<MkitError> for BisectError
Source§impl From<MkitError> for BlameError
impl From<MkitError> for BlameError
Source§impl From<MkitError> for RebaseError
impl From<MkitError> for RebaseError
Source§impl From<MkitError> for RestoreError
impl From<MkitError> for RestoreError
Source§impl From<MkitError> for StashError
impl From<MkitError> for StashError
Source§impl From<MkitError> for StoreError
impl From<MkitError> for StoreError
Source§impl From<MkitError> for WorktreeError
impl From<MkitError> for WorktreeError
impl StructuralPartialEq for MkitError
Auto Trait Implementations§
impl Freeze for MkitError
impl RefUnwindSafe for MkitError
impl Send for MkitError
impl Sync for MkitError
impl Unpin for MkitError
impl UnsafeUnpin for MkitError
impl UnwindSafe for MkitError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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>
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