pub enum LogLineError {
MissingInvariant(&'static str),
MissingField(&'static str),
InvalidTransition {
from: Status,
to: Status,
},
AlreadyCommitted,
Signing,
}Expand description
Erros que podem ocorrer ao manipular um LogLine.
Todos os erros são retornados como LogLineError e podem ser convertidos
em strings legíveis usando Display (via thiserror).
Variants§
MissingInvariant(&'static str)
Um invariant obrigatório está faltando ou vazio.
Os invariants obrigatórios são: if_ok, if_doubt, if_not.
MissingField(&'static str)
Um campo obrigatório está faltando.
Campos obrigatórios: who, did, when.
InvalidTransition
Tentativa de transição de status inválida.
O lifecycle permite apenas: DRAFT → PENDING → COMMITTED ou DRAFT/PENDING → GHOST.
AlreadyCommitted
Tentativa de abandonar um LogLine que já está Committed.
LogLines Committed são imutáveis e não podem ser abandonados.
Signing
Erro durante a assinatura do LogLine.
Trait Implementations§
Source§impl Debug for LogLineError
impl Debug for LogLineError
Source§impl Display for LogLineError
impl Display for LogLineError
Source§impl Error for LogLineError
impl Error for LogLineError
1.30.0 · 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()
Source§impl PartialEq for LogLineError
impl PartialEq for LogLineError
impl StructuralPartialEq for LogLineError
Auto Trait Implementations§
impl Freeze for LogLineError
impl RefUnwindSafe for LogLineError
impl Send for LogLineError
impl Sync for LogLineError
impl Unpin for LogLineError
impl UnwindSafe for LogLineError
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