Trait rsget_lib::Streamable
source · pub trait Streamable {
fn new(url: String) -> Result<Box<Self>, StreamError>
where
Self: Sized;
fn get_title(&self) -> Option<String>;
fn get_author(&self) -> Option<String>;
fn is_online(&self) -> bool;
fn get_stream(&self) -> Result<StreamType, StreamError>;
fn get_ext(&self) -> String;
fn get_default_name(&self) -> String;
fn download(&self, path: String) -> Result<u64, StreamError>;
}
Required Methods§
sourcefn new(url: String) -> Result<Box<Self>, StreamError>where
Self: Sized,
fn new(url: String) -> Result<Box<Self>, StreamError>where
Self: Sized,
Creates a new streamable
Returns the author of the stream if possible
sourcefn get_stream(&self) -> Result<StreamType, StreamError>
fn get_stream(&self) -> Result<StreamType, StreamError>
Gets the url of the stream
sourcefn get_default_name(&self) -> String
fn get_default_name(&self) -> String
Gets the default name of the stream