pub struct FormError { /* private fields */ }
Expand description
An error from “form add” operations.
THis structure wraps a CURLFORMcode
.
Implementations§
Source§impl FormError
impl FormError
Sourcepub fn new(code: CURLFORMcode) -> FormError
pub fn new(code: CURLFORMcode) -> FormError
Creates a new error from the underlying code returned by libcurl.
Sourcepub fn is_option_twice(&self) -> bool
pub fn is_option_twice(&self) -> bool
Returns whether this error corresponds to CURL_FORMADD_OPTION_TWICE.
Sourcepub fn is_unknown_option(&self) -> bool
pub fn is_unknown_option(&self) -> bool
Returns whether this error corresponds to CURL_FORMADD_UNKNOWN_OPTION.
Sourcepub fn is_incomplete(&self) -> bool
pub fn is_incomplete(&self) -> bool
Returns whether this error corresponds to CURL_FORMADD_INCOMPLETE.
Sourcepub fn is_illegal_array(&self) -> bool
pub fn is_illegal_array(&self) -> bool
Returns whether this error corresponds to CURL_FORMADD_ILLEGAL_ARRAY.
Sourcepub fn is_disabled(&self) -> bool
pub fn is_disabled(&self) -> bool
Returns whether this error corresponds to CURL_FORMADD_DISABLED.
Sourcepub fn code(&self) -> CURLFORMcode
pub fn code(&self) -> CURLFORMcode
Returns the value of the underlying error corresponding to libcurl.
Sourcepub fn description(&self) -> &str
pub fn description(&self) -> &str
Returns a human-readable description of this error code.
Trait Implementations§
Source§impl Error for FormError
impl Error for FormError
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()
impl StructuralPartialEq for FormError
Auto Trait Implementations§
impl Freeze for FormError
impl RefUnwindSafe for FormError
impl Send for FormError
impl Sync for FormError
impl Unpin for FormError
impl UnwindSafe for FormError
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