pub struct Seq {
pub indices: Vec<i64>,
pub missed: Vec<i64>,
pub start: i64,
pub end: i64,
pub padding: usize,
/* private fields */
}Expand description
Sequence of numbered files
Fields§
§indices: Vec<i64>Frame numbers actually present
missed: Vec<i64>Missing frame numbers
start: i64First frame
end: i64Last frame
padding: usizePadding (0 = variable/unpadded, >0 = fixed width)
Implementations§
Source§impl Seq
impl Seq
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Check if sequence is empty (required by Clippy when len() exists)
Sourcepub fn get_file(&self, frame: i64) -> Option<String>
pub fn get_file(&self, frame: i64) -> Option<String>
Get full file path for specific frame number. Returns None if frame doesn’t exist in sequence (not in indices).
§Arguments
frame- Frame number to look up
§Returns
Some(path) if frame exists, None otherwise
§Example
let seq = ...; // frames 1-100, pattern: "/renders/img_####.exr"
assert_eq!(seq.get_file(42), Some("/renders/img_0042.exr".to_string()));
assert_eq!(seq.get_file(999), None); // frame doesn't existSourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Sourcepub fn expand(&self) -> Result<Vec<String>, String>
pub fn expand(&self) -> Result<Vec<String>, String>
Expand sequence to all frame paths in range (start..=end). Includes paths for ALL frames including missing ones.
§Safety
Limited to 1M frames to prevent OOM. Returns error if range exceeds limit.
§Example
let seq = ...; // frames 1-3, pattern: "/img_@.exr"
assert_eq!(seq.expand()?, vec!["/img_1.exr", "/img_2.exr", "/img_3.exr"]);Sourcepub fn expand_existing(&self) -> Vec<String>
pub fn expand_existing(&self) -> Vec<String>
Sourcepub fn first_file(&self) -> &str
pub fn first_file(&self) -> &str
Get first file path in sequence with original case. Use this for file operations (reading, globbing) since pattern() may have lowercase paths on Windows.
Sourcepub fn frame_count(&self) -> usize
pub fn frame_count(&self) -> usize
Get frame count (number of existing frames, not range).
Sourcepub fn range_count(&self) -> i64
pub fn range_count(&self) -> i64
Get total range (end - start + 1), including missing frames.
Sourcepub fn to_map(&self) -> HashMap<&'static str, Value>
pub fn to_map(&self) -> HashMap<&'static str, Value>
Convert sequence to HashMap for serialization/inspection. Useful for JSON export or debugging.
Sourcepub fn to_json_pretty(&self) -> String
pub fn to_json_pretty(&self) -> String
Serialize sequence to pretty JSON string.
Sourcepub fn group_seqs(flist: &mut Vec<File>) -> Vec<Seq>
pub fn group_seqs(flist: &mut Vec<File>) -> Vec<Seq>
Group files into sequences. Uses mask-based grouping to handle unpadded sequences correctly.
Sourcepub fn extract_seq(target: &File, files: &mut Vec<File>) -> Option<Seq>
pub fn extract_seq(target: &File, files: &mut Vec<File>) -> Option<Seq>
Extract sequence containing target file from file list. Drains files with matching sig_hash, returns Seq containing target.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Seq
impl RefUnwindSafe for Seq
impl Send for Seq
impl Sync for Seq
impl Unpin for Seq
impl UnwindSafe for Seq
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)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>
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>
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