pub struct LibraryInstaller {
pub destination: PathBuf,
}Expand description
Installs required libraries.
§Examples
let destination = PathBuf::from("libs");
let installer = LibraryInstaller::new(destination);
let youtube = installer.install_youtube(None).await.unwrap();
let ffmpeg = installer.install_ffmpeg(None).await.unwrap();Fields§
§destination: PathBufThe destination directory for the libraries.
Implementations§
Source§impl LibraryInstaller
impl LibraryInstaller
pub const fn new(destination: PathBuf) -> LibraryInstaller
Source§impl LibraryInstaller
impl LibraryInstaller
Sourcepub async fn install_youtube(
&self,
custom_name: Option<String>,
) -> Result<PathBuf>
pub async fn install_youtube( &self, custom_name: Option<String>, ) -> Result<PathBuf>
Install yt-dlp from the main repository.
§Arguments
custom_name- Optional custom name for the executable.
Sourcepub async fn install_youtube_from_repo(
&self,
owner: impl Into<String>,
repo: impl Into<String>,
auth_token: Option<String>,
custom_name: Option<String>,
) -> Result<PathBuf>
pub async fn install_youtube_from_repo( &self, owner: impl Into<String>, repo: impl Into<String>, auth_token: Option<String>, custom_name: Option<String>, ) -> Result<PathBuf>
Install yt-dlp from a custom repository, assuming releases assets are named correctly.
§Arguments
owner- The owner of the repository.repo- The name of the repository.auth_token- Optional GitHub token to avoid rate limits.custom_name- Optional custom name for the executable.
Trait Implementations§
Source§impl Clone for LibraryInstaller
impl Clone for LibraryInstaller
Source§fn clone(&self) -> LibraryInstaller
fn clone(&self) -> LibraryInstaller
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 LibraryInstaller
impl Debug for LibraryInstaller
Auto Trait Implementations§
impl Freeze for LibraryInstaller
impl RefUnwindSafe for LibraryInstaller
impl Send for LibraryInstaller
impl Sync for LibraryInstaller
impl Unpin for LibraryInstaller
impl UnsafeUnpin for LibraryInstaller
impl UnwindSafe for LibraryInstaller
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.