pub enum ClientError {
BadUrl(String),
Connect(String),
Io(String),
BadPlusHeader(String),
PlusError(String),
}Expand description
What can go wrong fetching a gopher resource. There is no protocol-error variant because gopher has no status line: a server that dislikes a request answers with an error item inside an ordinary menu body.
Variants§
BadUrl(String)
The URL could not be parsed, or it lacks a host.
Connect(String)
The TCP connection could not be established.
Io(String)
A read or write failed mid-exchange.
BadPlusHeader(String)
A Gopher+ reply did not begin with a well-formed header. Only Gopher+ transactions can produce this; plain RFC 1436 replies have no header.
PlusError(String)
A Gopher+ server answered --1. The string is the error text it sent.
Trait Implementations§
Source§impl Clone for ClientError
impl Clone for ClientError
Source§fn clone(&self) -> ClientError
fn clone(&self) -> ClientError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ClientError
impl Debug for ClientError
Source§impl Display for ClientError
impl Display for ClientError
impl Eq for ClientError
Source§impl Error for ClientError
impl Error for ClientError
1.30.0 · 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()
Source§impl From<MalformedHeader> for ClientError
impl From<MalformedHeader> for ClientError
Source§fn from(error: MalformedHeader) -> Self
fn from(error: MalformedHeader) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ClientError
impl PartialEq for ClientError
impl StructuralPartialEq for ClientError
Auto Trait Implementations§
impl Freeze for ClientError
impl RefUnwindSafe for ClientError
impl Send for ClientError
impl Sync for ClientError
impl Unpin for ClientError
impl UnsafeUnpin for ClientError
impl UnwindSafe for ClientError
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