pub struct FormError { /* private fields */ }
Expand description
An error from “form add” operations.
THis structure wraps a CURLFORMcode
.
Implementations
sourceimpl 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
sourceimpl Error for FormError
impl Error for FormError
1.30.0 · 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()
impl StructuralPartialEq for FormError
Auto Trait Implementations
impl RefUnwindSafe for FormError
impl Send for FormError
impl Sync for FormError
impl Unpin for FormError
impl UnwindSafe for FormError
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more