[][src]Struct youtube_dl::YoutubeDl

pub struct YoutubeDl { /* fields omitted */ }

A builder to create a youtube-dl command to execute.

Implementations

impl YoutubeDl[src]

pub fn new<S: Into<String>>(url: S) -> Self[src]

Create a new builder.

pub fn youtube_dl_path<P: AsRef<Path>>(
    &mut self,
    youtube_dl_path: P
) -> &mut Self
[src]

Set the path to the youtube-dl executable.

pub fn format<S: Into<String>>(&mut self, format: S) -> &mut Self[src]

Set the -F command line option.

pub fn socket_timeout<S: Into<String>>(
    &mut self,
    socket_timeout: S
) -> &mut Self
[src]

Set the --socket-timeout command line flag.

pub fn user_agent<S: Into<String>>(&mut self, user_agent: S) -> &mut Self[src]

Set the --user-agent command line flag.

pub fn referer<S: Into<String>>(&mut self, referer: S) -> &mut Self[src]

Set the --referer command line flag.

pub fn all_formats(&mut self, all_formats: bool) -> &mut Self[src]

Set the --all-formats command line flag.

pub fn auth<S: Into<String>>(&mut self, username: S, password: S) -> &mut Self[src]

Set the -u and -p command line flags.

pub fn process_timeout(&mut self, timeout: Duration) -> &mut Self[src]

Set a process-level timeout for youtube-dl. (this controls the maximum overall duration the process may take, when it times out, Error::ProcessTimeout is returned)

pub fn run(&self) -> Result<YoutubeDlOutput, Error>[src]

Run youtube-dl with the arguments specified through the builder.

Trait Implementations

impl Clone for YoutubeDl[src]

impl Debug for YoutubeDl[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.