[−][src]Struct youtube_dl::YoutubeDl
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]
&mut self,
youtube_dl_path: P
) -> &mut Self
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]
&mut self,
socket_timeout: S
) -> &mut Self
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
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,