pub struct YtDlpCommand { /* private fields */ }
Available on crate feature
process
only.Expand description
Helper to construct a valid yt-dlp
command that outputs to stdout
.
Implementations§
Source§impl YtDlpCommand
impl YtDlpCommand
Sourcepub fn new<S>(url: S) -> Self
pub fn new<S>(url: S) -> Self
Creates a mew YtDlpCommand
.
Sourcepub fn into_command(self) -> Command
pub fn into_command(self) -> Command
Creates a Command
from the given parameters.
Sourcepub fn extract_audio(self, extract_audio: bool) -> Self
pub fn extract_audio(self, extract_audio: bool) -> Self
Extract audio from the given URL.
Sourcepub fn format<S>(self, format: S) -> Self
pub fn format<S>(self, format: S) -> Self
Extract content using the provided format. An error will be thrown when running the command if the format is not available.
Sourcepub fn yt_dlp_path<S>(self, path: S) -> Self
pub fn yt_dlp_path<S>(self, path: S) -> Self
Sets the path to the yt-dlp
binary.
Trait Implementations§
Source§impl Clone for YtDlpCommand
impl Clone for YtDlpCommand
Source§fn clone(&self) -> YtDlpCommand
fn clone(&self) -> YtDlpCommand
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for YtDlpCommand
impl Debug for YtDlpCommand
Source§impl From<YtDlpCommand> for Command
impl From<YtDlpCommand> for Command
Source§fn from(value: YtDlpCommand) -> Self
fn from(value: YtDlpCommand) -> Self
Converts to this type from the input type.
Source§impl SpawnCommand for YtDlpCommand
impl SpawnCommand for YtDlpCommand
Source§fn spawn(self) -> Result<SpawnedCommand>
fn spawn(self) -> Result<SpawnedCommand>
Spawns the command with the stdout and stderr handles configured appropriately.
Auto Trait Implementations§
impl Freeze for YtDlpCommand
impl RefUnwindSafe for YtDlpCommand
impl Send for YtDlpCommand
impl Sync for YtDlpCommand
impl Unpin for YtDlpCommand
impl UnwindSafe for YtDlpCommand
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