pub struct YoutubeDL { /* private fields */ }
Expand description
Structure that represents a youtube-dl task.
Every task needs a download location, a list of [‘Arg’] that can be empty and a [‘link’] to the desired source.
Implementations§
Source§impl YoutubeDL
impl YoutubeDL
Sourcepub fn new_multiple_links(
dl_path: &PathBuf,
args: Vec<Arg>,
links: Vec<String>,
) -> Result<YoutubeDL, YoutubeDLError>
pub fn new_multiple_links( dl_path: &PathBuf, args: Vec<Arg>, links: Vec<String>, ) -> Result<YoutubeDL, YoutubeDLError>
Creates a new YoutubeDL job to be executed.
It takes a path where youtube-dl should be executed, a vec! of Arg
that can be empty
and finally a link that can be ""
if no video should be downloaded
The path gets canonicalized and the directory gets created by the constructor
pub fn new( dl_path: &PathBuf, args: Vec<Arg>, link: &str, ) -> Result<YoutubeDL, YoutubeDLError>
Sourcepub fn download(&self) -> Result<YoutubeDLResult, YoutubeDLError>
pub fn download(&self) -> Result<YoutubeDLResult, YoutubeDLError>
Starts the download and returns when finished the result as YoutubeDLResult
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for YoutubeDL
impl RefUnwindSafe for YoutubeDL
impl Send for YoutubeDL
impl Sync for YoutubeDL
impl Unpin for YoutubeDL
impl UnwindSafe for YoutubeDL
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more