#[non_exhaustive]pub enum SdkError {
Transport(TransportError),
Init(String),
Channel(String),
Timeout {
operation: &'static str,
elapsed: Duration,
},
InvalidContext(&'static str),
Serialization(Error),
Io(Error),
Plugin(Box<dyn Error + Send + Sync>),
}Expand description
Errors that can occur within the plugin SDK or be propagated from plugins.
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.
Transport(TransportError)
An error originating from the IPC or gRPC transport layer.
Init(String)
A failure during plugin or runtime initialization.
Channel(String)
A blocking_send / try_send on a result or event channel failed. Almost always means the receiver was dropped (daemon disconnected).
Timeout
An operation timed out waiting for an external signal.
InvalidContext(&'static str)
A Context method was called from a place where the required
state isn’t set up (e.g. push_result outside on_task,
wait_for_execution in a lifecycle handler).
Serialization(Error)
A JSON serialization or deserialization error (e.g. config parsing).
Io(Error)
A standard I/O error (e.g. reading a sample file).
Plugin(Box<dyn Error + Send + Sync>)
An opaque error returned by plugin handler code.
Trait Implementations§
Source§impl Error for SdkError
impl Error for SdkError
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 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
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].