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
sourceimpl 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 RefUnwindSafe for YoutubeDL
impl Send for YoutubeDL
impl Sync for YoutubeDL
impl Unpin for YoutubeDL
impl UnwindSafe for YoutubeDL
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more