Struct gstreamer_video::Error [−][src]
pub struct Error(_);
A generic error capable of representing various error domains (types).
Methods
impl Error[src]
impl Errorpub fn new<T>(error: T, message: &str) -> Error where
T: ErrorDomain, [src]
pub fn new<T>(error: T, message: &str) -> Error where
T: ErrorDomain, Creates an error with supplied error enum variant and message.
pub fn is<T>(&self) -> bool where
T: ErrorDomain, [src]
pub fn is<T>(&self) -> bool where
T: ErrorDomain, Checks if the error domain matches T.
pub fn kind<T>(&self) -> Option<T> where
T: ErrorDomain, [src]
pub fn kind<T>(&self) -> Option<T> where
T: ErrorDomain, Tries to convert to a specific error enum.
Returns Some if the error belongs to the enum's error domain and
None otherwise.
Examples
if let Some(file_error) = error.kind::<FileError>() { match file_error { FileError::Exist => ... FileError::Isdir => ... ... } }
match error { Some(FileError::Exist) => ... Some(FileError::Isdir) => ... ... }
pub fn wrap(ptr: *mut GError) -> Error[src]
pub fn wrap(ptr: *mut GError) -> ErrorTrait Implementations
impl Display for Error[src]
impl Display for Errorfn fmt(&self, f: &mut Formatter) -> Result<(), Error>[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>Formats the value using the given formatter. Read more
impl Clone for Error[src]
impl Clone for Errorfn clone(&self) -> Error[src]
fn clone(&self) -> ErrorReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl Error for Error[src]
impl Error for Errorfn description(&self) -> &str[src]
fn description(&self) -> &strThis method is soft-deprecated. Read more
fn cause(&self) -> Option<&Error>1.0.0[src]
fn cause(&self) -> Option<&Error>The lower-level cause of this error, if any. Read more
impl Ord for Error[src]
impl Ord for Errorfn cmp(&self, other: &Error) -> Ordering[src]
fn cmp(&self, other: &Error) -> OrderingThis method returns an Ordering between self and other. Read more
fn max(self, other: Self) -> Self1.21.0[src]
fn max(self, other: Self) -> SelfCompares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self1.21.0[src]
fn min(self, other: Self) -> SelfCompares and returns the minimum of two values. Read more
impl Eq for Error[src]
impl Eq for Errorimpl Sync for Error[src]
impl Sync for Errorimpl StaticType for Error[src]
impl StaticType for Errorfn static_type() -> Type[src]
fn static_type() -> TypeReturns the type identifier of Self.
impl Hash for Error[src]
impl Hash for Errorfn hash<__H>(&self, state: &mut __H) where
__H: Hasher, [src]
fn hash<__H>(&self, state: &mut __H) where
__H: Hasher, Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, Feeds a slice of this type into the given [Hasher]. Read more
impl PartialEq<Error> for Error[src]
impl PartialEq<Error> for Errorfn eq(&self, other: &Error) -> bool[src]
fn eq(&self, other: &Error) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Error) -> bool[src]
fn ne(&self, other: &Error) -> boolThis method tests for !=.
impl Send for Error[src]
impl Send for Errorimpl Debug for Error[src]
impl Debug for Errorfn fmt(&self, f: &mut Formatter) -> Result<(), Error>[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>Formats the value using the given formatter. Read more
impl PartialOrd<Error> for Error[src]
impl PartialOrd<Error> for Errorfn partial_cmp(&self, other: &Error) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &Error) -> Option<Ordering>This method returns an ordering between self and other values if one exists. Read more
fn lt(&self, other: &Error) -> bool[src]
fn lt(&self, other: &Error) -> boolThis method tests less than (for self and other) and is used by the < operator. Read more
fn le(&self, other: &Error) -> bool[src]
fn le(&self, other: &Error) -> boolThis method tests less than or equal to (for self and other) and is used by the <= operator. Read more
fn gt(&self, other: &Error) -> bool[src]
fn gt(&self, other: &Error) -> boolThis method tests greater than (for self and other) and is used by the > operator. Read more
fn ge(&self, other: &Error) -> bool[src]
fn ge(&self, other: &Error) -> boolThis method tests greater than or equal to (for self and other) and is used by the >= operator. Read more