#[non_exhaustive]pub enum SeaFileError {
Connect {
target: String,
source: Box<dyn StdError + Send + Sync>,
},
Subscribe {
stream: String,
source: Box<dyn StdError + Send + Sync>,
},
Receive {
stream: String,
source: Box<dyn StdError + Send + Sync>,
},
Publish {
stream: String,
source: Box<dyn StdError + Send + Sync>,
},
Seek {
stream: String,
source: Box<dyn StdError + Send + Sync>,
},
NotConnected,
Invalid(String),
}Expand description
Errors returned by the file and stdio transports.
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
Opening (or creating) the stream file, or attaching stdio, failed.
Fields
Subscribe
Opening a subscription failed.
Fields
Receive
The transport failed while receiving.
Fields
Publish
Publishing failed.
Fields
Seek
Repositioning failed.
Fields
NotConnected
The handle is used before connect filled the shared state, or after shutdown.
Invalid(String)
A descriptor or payload is invalid for this transport.
Trait Implementations§
Source§impl Debug for SeaFileError
impl Debug for SeaFileError
Source§impl Display for SeaFileError
impl Display for SeaFileError
Source§impl Error for SeaFileError
impl Error for SeaFileError
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 SeaFileError
impl !UnwindSafe for SeaFileError
impl Freeze for SeaFileError
impl Send for SeaFileError
impl Sync for SeaFileError
impl Unpin for SeaFileError
impl UnsafeUnpin for SeaFileError
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