pub struct Subler {
pub source: String,
pub dest: Option<String>,
pub optimize: bool,
pub atoms: Atoms,
pub media_kind: Option<MediaKind>,
}Fields§
§source: StringThe path to the source file
dest: Option<String>The path to the destination file
optimize: boolThe Subler optimization flag
atoms: AtomsThe atoms that should be written to the file
media_kind: Option<MediaKind>The Mediakind of the file
Implementations§
Source§impl Subler
impl Subler
Sourcepub fn new(source: &str, atoms: Atoms) -> Self
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
Sourcepub fn cli_executeable() -> String
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
Sourcepub fn spawn_tag(&mut self) -> Result<Child>
pub fn spawn_tag(&mut self) -> Result<Child>
Executes the tagging command as a child process, returning a handle to it.
Sourcepub fn build_tag_command(&mut self) -> Result<Command>
pub fn build_tag_command(&mut self) -> Result<Command>
create the subler process command
Sourcepub fn tag(&mut self) -> Result<Output>
pub fn tag(&mut self) -> Result<Output>
Apply the specified metadata to the source file and output it to the specified destination file
pub fn media_kind(&mut self, kind: Option<MediaKind>) -> &mut Self
Trait Implementations§
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> 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