#[non_exhaustive]pub enum PubSubError {
Connect(Box<dyn StdError + Send + Sync>),
Admin {
name: String,
source: Box<dyn StdError + Send + Sync>,
},
Receive {
subscription: String,
source: Box<dyn StdError + Send + Sync>,
},
Publish {
topic: String,
source: Box<dyn StdError + Send + Sync>,
},
NotConnected,
InvalidDescriptor(String),
}Expand description
Errors returned by the Google Cloud Pub/Sub broker.
One enum for the whole crate, variants by source, per the RustStream broker conventions.
The wrapped sources are boxed std errors so the public API does not leak the client’s
error types.
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.
Connect(Box<dyn StdError + Send + Sync>)
Building a client (authentication or connection setup) failed.
Admin
A topic or subscription admin call failed.
Fields
Receive
The streaming pull failed permanently (transient failures are retried by the client).
Fields
Publish
Publishing to a topic failed.
Fields
NotConnected
The handle is used before connect filled the shared connection, or after shutdown.
InvalidDescriptor(String)
A subscription descriptor is invalid.
Trait Implementations§
Source§impl Debug for PubSubError
impl Debug for PubSubError
Source§impl Display for PubSubError
impl Display for PubSubError
Source§impl Error for PubSubError
impl Error for PubSubError
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 !RefUnwindSafe for PubSubError
impl !UnwindSafe for PubSubError
impl Freeze for PubSubError
impl Send for PubSubError
impl Sync for PubSubError
impl Unpin for PubSubError
impl UnsafeUnpin for PubSubError
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request