pub struct EncState {
pub jobs: Vec<VideoJob>,
pub selected_profile: String,
pub root_path: PathBuf,
pub profile_config: Option<Profile>,
}Expand description
Persistent state stored in .enc_state file
Fields§
§jobs: Vec<VideoJob>§selected_profile: String§root_path: PathBuf§profile_config: Option<Profile>The actual profile configuration (takes precedence over selected_profile)
Implementations§
Source§impl EncState
impl EncState
Sourcepub fn new_with_profile(
jobs: Vec<VideoJob>,
profile: String,
root: PathBuf,
profile_config: Option<Profile>,
) -> Self
pub fn new_with_profile( jobs: Vec<VideoJob>, profile: String, root: PathBuf, profile_config: Option<Profile>, ) -> Self
Create new state with profile config
Sourcepub fn new(jobs: Vec<VideoJob>, profile: String, root: PathBuf) -> Self
pub fn new(jobs: Vec<VideoJob>, profile: String, root: PathBuf) -> Self
Create new state (for backwards compatibility)
Sourcepub fn load(root: &Path) -> Result<Self>
pub fn load(root: &Path) -> Result<Self>
Load state from .enc_state file in root directory Resets any Running/Failed jobs to Pending for resume
Sourcepub fn save_queue_status(&self, root: &Path) -> Result<()>
pub fn save_queue_status(&self, root: &Path) -> Result<()>
Save simple completion status to .enc_queue dotfile Format: lines starting with # are completed, others are pending
Sourcepub fn load_queue_status(&mut self, root: &Path) -> Result<()>
pub fn load_queue_status(&mut self, root: &Path) -> Result<()>
Load completion status from .enc_queue dotfile and update job statuses
Trait Implementations§
Source§impl<'de> Deserialize<'de> for EncState
impl<'de> Deserialize<'de> for EncState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for EncState
impl RefUnwindSafe for EncState
impl Send for EncState
impl Sync for EncState
impl Unpin for EncState
impl UnwindSafe for EncState
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more