#[non_exhaustive]pub enum KinesisError {
Config(String),
Stream {
stream: String,
source: Box<dyn StdError + Send + Sync>,
},
Read {
stream: String,
shard: String,
source: Box<dyn StdError + Send + Sync>,
},
AggregatedRecord {
shard: String,
},
Publish {
stream: String,
source: Box<dyn StdError + Send + Sync>,
},
Lease {
shard: String,
source: Box<dyn StdError + Send + Sync>,
},
NotConnected,
Invalid(String),
}Expand description
Errors returned by the Amazon Kinesis Data Streams broker.
One enum for the whole crate, variants by source, per the RustStream broker conventions.
The wrapped sources are boxed std errors formatted with their full cause chain, so the
public API does not leak the SDK’s layered error types.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Config(String)
Loading the AWS configuration failed.
Stream
A stream admin call (describe, create, shard listing) failed.
Fields
Read
Reading a shard failed permanently.
Fields
AggregatedRecord
A delivered record is KPL-aggregated, which this crate does not deaggregate yet; failing loudly beats handing the handler an opaque protobuf blob.
Publish
Writing a record failed.
Fields
Lease
The lease store failed.
Fields
NotConnected
The handle is used before connect filled the shared connection, or after shutdown.
Invalid(String)
A stream descriptor is invalid.
Trait Implementations§
Source§impl Debug for KinesisError
impl Debug for KinesisError
Source§impl Display for KinesisError
impl Display for KinesisError
Source§impl Error for KinesisError
impl Error for KinesisError
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()
Auto Trait Implementations§
impl !RefUnwindSafe for KinesisError
impl !UnwindSafe for KinesisError
impl Freeze for KinesisError
impl Send for KinesisError
impl Sync for KinesisError
impl Unpin for KinesisError
impl UnsafeUnpin for KinesisError
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
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more