Struct gstreamer_base::Error
[−]
[src]
pub struct Error(_);
A generic error capable of representing various error domains (types).
Methods
impl Error
[src]
fn new<T>(error: T, message: &str) -> Error where
T: ErrorDomain,
[src]
T: ErrorDomain,
Creates an error with supplied error enum variant and message.
fn is<T>(&self) -> bool where
T: ErrorDomain,
[src]
T: ErrorDomain,
Checks if the error domain matches T
.
fn kind<T>(&self) -> Option<T> where
T: ErrorDomain,
[src]
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
⚠Be careful when using this code, it's not being tested!
if let Some(file_error) = error.kind::<FileError>() { match file_error { FileError::Exist => ... FileError::Isdir => ... ... } }
⚠Be careful when using this code, it's not being tested!
match error { Some(FileError::Exist) => ... Some(FileError::Isdir) => ... ... }
fn wrap(ptr: *mut GError) -> Error
[src]
Trait Implementations
impl Clone for Error
[src]
fn clone(&self) -> Error
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Sync for Error
[src]
impl Error for Error
[src]
fn description(&self) -> &str
[src]
impl Send for Error
[src]
impl Debug for Error
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter.
impl StaticType for Error
[src]
fn static_type() -> Type
[src]
Returns the type identifier of Self
.