mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-22 19:41:00 +00:00
Implement Error/Display for AdapterError
This commit is contained in:
parent
a99522150b
commit
8e1428c047
1 changed files with 14 additions and 0 deletions
|
@ -9,6 +9,8 @@
|
|||
use std::collections::VecDeque;
|
||||
use std::cmp;
|
||||
use std::io;
|
||||
use std::fmt;
|
||||
use std::error::Error;
|
||||
|
||||
use gst;
|
||||
use gst::prelude::*;
|
||||
|
@ -35,6 +37,18 @@ pub enum AdapterError {
|
|||
NotEnoughData,
|
||||
}
|
||||
|
||||
impl fmt::Display for AdapterError {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "Not enough data")
|
||||
}
|
||||
}
|
||||
|
||||
impl Error for AdapterError {
|
||||
fn description(&self) -> &str {
|
||||
"Not enough data"
|
||||
}
|
||||
}
|
||||
|
||||
impl Adapter {
|
||||
pub fn new() -> Adapter {
|
||||
Adapter {
|
||||
|
|
Loading…
Reference in a new issue