pub struct ShareError { /* private fields */ }
Expand description
An error returned from “share” operations.
This structure wraps a CURLSHcode
.
Implementations§
Sourcepub fn new(code: CURLSHcode) -> ShareError
pub fn new(code: CURLSHcode) -> ShareError
Creates a new error from the underlying code returned by libcurl.
Sourcepub fn is_bad_option(&self) -> bool
pub fn is_bad_option(&self) -> bool
Returns whether this error corresponds to CURLSHE_BAD_OPTION.
Sourcepub fn is_invalid(&self) -> bool
pub fn is_invalid(&self) -> bool
Returns whether this error corresponds to CURLSHE_INVALID.
Sourcepub fn code(&self) -> CURLSHcode
pub fn code(&self) -> CURLSHcode
Returns the value of the underlying error corresponding to libcurl.
Sourcepub fn description(&self) -> &str
pub fn description(&self) -> &str
Returns curl’s human-readable version of this error.
Trait Implementations§
Source§fn clone(&self) -> ShareError
fn clone(&self) -> ShareError
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more1.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§fn from(e: ShareError) -> Error
fn from(e: ShareError) -> Error
Converts to this type from the input type.
Auto Trait Implementations§
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