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.
Trait Implementations§
source§impl Error for FormError
impl Error for FormError
source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more