Enum golgi::error::GolgiError
source · [−]pub enum GolgiError {
DecodeBase64(DecodeError),
Io {
source: IoError,
context: String,
},
Handshake(HandshakeError),
Api(ApiError),
Feed(FeedError),
Rpc(RpcError),
Sbot(String),
SerdeJson(JsonError),
ContentType(String),
Utf8Parse {
source: Utf8Error,
},
}
Expand description
A custom error type encapsulating all possible errors for this library.
From
implementations are provided for external error types, allowing
the ?
operator to be used on functions which return Result<_, GolgiError>
.
Variants
DecodeBase64(DecodeError)
Failed to decode base64.
Io
IO error with context.
Handshake(HandshakeError)
Scuttlebutt secret handshake error.
Api(ApiError)
Kuska SSB API error.
Feed(FeedError)
Kuska SSB feed error.
Rpc(RpcError)
Kuska SSB RPC error.
Sbot(String)
Go-sbot error.
SerdeJson(JsonError)
JSON serialization or deserialization error.
ContentType(String)
Error decoding typed ssb message from content.
Utf8Parse
Fields
source: Utf8Error
The underlying parse error.
Error decoding UTF8 string from bytes
Trait Implementations
sourceimpl Debug for GolgiError
impl Debug for GolgiError
sourceimpl Display for GolgiError
impl Display for GolgiError
sourceimpl Error for GolgiError
impl Error for GolgiError
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl From<DecodeError> for GolgiError
impl From<DecodeError> for GolgiError
sourcefn from(err: DecodeError) -> Self
fn from(err: DecodeError) -> Self
Performs the conversion.
sourceimpl From<Error> for GolgiError
impl From<Error> for GolgiError
sourcefn from(err: HandshakeError) -> Self
fn from(err: HandshakeError) -> Self
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for GolgiError
impl Send for GolgiError
impl Sync for GolgiError
impl Unpin for GolgiError
impl UnwindSafe for GolgiError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more