pub enum SdkError {
Show 15 variants
Unauthenticated,
Unauthorized {
permission: String,
},
ControllerRequired {
holder: Option<String>,
expires_at_ms: Option<u64>,
},
LeaseExpired,
InvalidArgument {
operation: SdkOperation,
message: String,
},
NotFound {
operation: SdkOperation,
message: String,
},
UnsupportedAction(&'static str),
UnsupportedOperation(String),
ReplayGap(u64),
Closed,
Transport(String),
UnknownRequest(u64),
InvalidResponse(String),
Submit(RuntimeSubmitError),
Execution {
operation: SdkOperation,
message: String,
},
}Expand description
Typed failure returned by every SDK adapter and compatibility projection.
Variants§
Unauthenticated
A runtime operation was attempted without authenticated client state.
The authenticated client lacks a required runtime permission.
Fields
Stable permission spelling.
ControllerRequired
Mutation requires the controller lease. When another client owns it, its opaque identity and deadline are included for deterministic retry.
Fields
LeaseExpired
This client previously controlled the runtime but its lease expired.
InvalidArgument
Input did not satisfy an operation contract.
NotFound
A stable identity was not found.
UnsupportedAction(&'static str)
The active adapter does not implement the requested action.
UnsupportedOperation(String)
The requested catalog operation is absent or has no typed route.
ReplayGap(u64)
A slow consumer fell behind the bounded live-event channel.
Closed
The runtime closed its event stream.
Transport(String)
An authenticated remote transport failed or returned an invalid value.
UnknownRequest(u64)
No live request exists for the supplied response id.
InvalidResponse(String)
The response kind or value does not match the pending request.
Submit(RuntimeSubmitError)
The canonical runtime rejected or failed a turn.
Execution
A session/runtime implementation failed after validation.
Implementations§
Source§impl SdkError
impl SdkError
Sourcepub fn new(
code: SdkErrorCode,
operation: SdkOperation,
message: impl Into<String>,
) -> Self
pub fn new( code: SdkErrorCode, operation: SdkOperation, message: impl Into<String>, ) -> Self
Construct a typed failure for an SDK operation.
Sourcepub fn unsupported(operation: SdkOperation) -> Self
pub fn unsupported(operation: SdkOperation) -> Self
Construct a named unsupported-action failure.
Sourcepub fn code(&self) -> SdkErrorCode
pub fn code(&self) -> SdkErrorCode
Stable machine-readable category.
Sourcepub fn operation(&self) -> Option<SdkOperation>
pub fn operation(&self) -> Option<SdkOperation>
Operation associated with this failure when it is unambiguous.
Trait Implementations§
impl Eq for SdkError
Source§impl Error for SdkError
impl Error for SdkError
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<RuntimeSubmitError> for SdkError
impl From<RuntimeSubmitError> for SdkError
Source§fn from(source: RuntimeSubmitError) -> Self
fn from(source: RuntimeSubmitError) -> Self
impl StructuralPartialEq for SdkError
Auto Trait Implementations§
impl Freeze for SdkError
impl RefUnwindSafe for SdkError
impl Send for SdkError
impl Sync for SdkError
impl Unpin for SdkError
impl UnsafeUnpin for SdkError
impl UnwindSafe for SdkError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.