Subler

Struct Subler 

Source
pub struct Subler {
    pub source: String,
    pub dest: Option<String>,
    pub optimize: bool,
    pub atoms: Atoms,
    pub media_kind: Option<MediaKind>,
}

Fields§

§source: String

The path to the source file

§dest: Option<String>

The path to the destination file

§optimize: bool

The Subler optimization flag

§atoms: Atoms

The atoms that should be written to the file

§media_kind: Option<MediaKind>

The Mediakind of the file

Implementations§

Source§

impl Subler

Source

pub fn new(source: &str, atoms: Atoms) -> Self

creates a new SublerCli Interface with a set of Atoms that should be set to the the file at the source By default MediaKind is set to MediaKind::Movie and optimization level is set to true

Source

pub fn cli_executeable() -> String

returns the path to the sublercli executeable Assumes a homebrew installtion by default under /usr/local/bin/SublerCli, can be overwritten setting the SUBLER_CLI_PATH env variable

Source

pub fn spawn_tag(&mut self) -> Result<Child>

Executes the tagging command as a child process, returning a handle to it.

Source

pub fn build_tag_command(&mut self) -> Result<Command>

create the subler process command

Source

pub fn tag(&mut self) -> Result<Output>

Apply the specified metadata to the source file and output it to the specified destination file

Source

pub fn optimize(&mut self, val: bool) -> &mut Self

sets the optimization flag

Source

pub fn media_kind(&mut self, kind: Option<MediaKind>) -> &mut Self

Source

pub fn dest(&mut self, dest: &str) -> &mut Self

sets the destination of the output file

Trait Implementations§

Source§

impl Debug for Subler

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Subler

§

impl RefUnwindSafe for Subler

§

impl Send for Subler

§

impl Sync for Subler

§

impl Unpin for Subler

§

impl UnwindSafe for Subler

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.