pub enum AppendError {
Conflict {
expected: Position,
actual: Position,
},
Fenced {
scope: NamedNode,
epoch: u64,
highest: u64,
},
Unsupported(String),
Invalid(String),
Storage(StoreError),
}Expand description
Why a journal append wrote nothing.
Every variant means the same thing for the journal: none of the append’s entries, and none of its state changes, are visible to any later read.
Variants§
Conflict
The actor’s journal is not at the expected position (compare-and-set failed).
Fields
Fenced
The fencing token is older than the highest epoch the store has accepted for its scope.
Fields
Unsupported(String)
The append carried a fencing token or a state delta, and the store does not support it
(see crate::JournalCapabilities).
Invalid(String)
The entries are malformed (empty append, wrong graph, duplicate entry IRI, a term the store cannot hold).
Storage(StoreError)
The store failed; the transaction was rolled back.
Implementations§
Source§impl AppendError
impl AppendError
Sourcepub fn is_conflict(&self) -> bool
pub fn is_conflict(&self) -> bool
True for AppendError::Conflict.
Sourcepub fn is_fenced(&self) -> bool
pub fn is_fenced(&self) -> bool
True for AppendError::Fenced.
Trait Implementations§
Source§impl Clone for AppendError
impl Clone for AppendError
Source§impl Debug for AppendError
impl Debug for AppendError
Source§impl Display for AppendError
impl Display for AppendError
impl Eq for AppendError
Source§impl Error for AppendError
impl Error for AppendError
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 From<StoreError> for AppendError
impl From<StoreError> for AppendError
Source§fn from(e: StoreError) -> Self
fn from(e: StoreError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for AppendError
impl PartialEq for AppendError
impl StructuralPartialEq for AppendError
Auto Trait Implementations§
impl Forget for AppendError
impl Freeze for AppendError
impl Move for AppendError
impl RefUnwindSafe for AppendError
impl Send for AppendError
impl Sync for AppendError
impl Unpin for AppendError
impl UnsafeUnpin for AppendError
impl UnwindSafe for AppendError
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