pub enum FactError {
ScopeNotFound {
scope: String,
},
FactNotFound {
fact_id: FactId,
},
Finality(FinalityError),
TransactionConflict {
scope: String,
reason: String,
},
InvalidEpochBump {
current_epoch: u64,
new_epoch: u64,
},
NotAuthorized {
scope: String,
reason: String,
},
JournalError {
reason: String,
},
HandlerUnavailable,
Internal {
reason: String,
},
TemporalQueryError {
reason: String,
},
CheckpointNotFound {
point: String,
},
InvalidOperation {
reason: String,
},
}Expand description
Error type for fact operations
Variants§
ScopeNotFound
Scope not found or not accessible
FactNotFound
Fact not found (for retraction/reference operations)
Finality(FinalityError)
Finality requirement not met
TransactionConflict
Transaction conflict (concurrent modification)
InvalidEpochBump
Invalid epoch bump (must be strictly increasing)
NotAuthorized
Authorization failed
JournalError
Journal write failed
Handler not available
Internal
Internal error
TemporalQueryError
Temporal query error
CheckpointNotFound
Checkpoint not found (for as_of queries)
InvalidOperation
Invalid operation
Implementations§
Source§impl FactError
impl FactError
Sourcepub fn scope_not_found(scope: &ScopeId) -> FactError
pub fn scope_not_found(scope: &ScopeId) -> FactError
Create a scope not found error
Sourcepub fn fact_not_found(fact_id: FactId) -> FactError
pub fn fact_not_found(fact_id: FactId) -> FactError
Create a fact not found error
Sourcepub fn conflict(scope: &ScopeId, reason: impl Into<String>) -> FactError
pub fn conflict(scope: &ScopeId, reason: impl Into<String>) -> FactError
Create a transaction conflict error
Create an authorization error
Sourcepub fn journal_error(reason: impl Into<String>) -> FactError
pub fn journal_error(reason: impl Into<String>) -> FactError
Create a journal error
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FactError
impl<'de> Deserialize<'de> for FactError
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<FactError, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<FactError, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Error for FactError
impl Error for FactError
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<FinalityError> for FactError
impl From<FinalityError> for FactError
Source§fn from(source: FinalityError) -> FactError
fn from(source: FinalityError) -> FactError
Converts to this type from the input type.
Source§impl Serialize for FactError
impl Serialize for FactError
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for FactError
impl RefUnwindSafe for FactError
impl Send for FactError
impl Sync for FactError
impl Unpin for FactError
impl UnsafeUnpin for FactError
impl UnwindSafe for FactError
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