#[non_exhaustive]pub enum Error {
Open(String),
Read(String),
FloorRefusal {
feature: String,
reason: String,
},
ResourceLimit {
what: String,
ceiling: String,
},
Ir(Error),
}Expand description
Everything the Git decoder can fail with. A refused source feature is a typed outcome
(Error::FloorRefusal), not a panic and not an approximation (FA-3).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Open(String)
The path is not a readable Git repository.
Read(String)
An object could not be read or decoded (a malformed or unreadable repository).
FloorRefusal
A source feature below the floor was hit; it is refused with a named reason (RFC 004 D-4, FA-3).
Fields
ResourceLimit
A resource ceiling was hit (a malformed or hostile repository); refused rather than exhausting
the host (RFC 010, brygge-03 T-8/C-2d).
Fields
Ir(Error)
The assembled IR violated a brygge-ir invariant (signals a decoder bug, not bad input).
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Forget for Error
impl Freeze for Error
impl Move for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
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