[−][src]Struct alass_util::TimeSpans
TimeSpan
buffer to be used as reference by the synchronization process
May be generated from an AudioSink
that's been processed for voice-
activity, extracted from a subtitle file whose timing is known to be good,
or populated manually by some other process (e.g. extracing embedded subs
from video file). TimeSpans
also provides functionality for reading and
writing raw timespan data to/from disk which is useful for caching.
Methods
impl TimeSpans
[src]
pub fn push(&mut self, span: SubTimeSpan)
[src]
Appends a timespan
pub fn save(&self, filename: &str) -> Result<(), TimeSpansSaveError>
[src]
Saves raw timespan data to disk
pub fn load(filename: &str) -> Result<Self, TimeSpansLoadError>
[src]
Loads raw timespan data from disk
pub fn from_sub_file(sub_file: &SubtitleFile) -> Result<Self, SyncError>
[src]
Create TimeSpans
instance from subtitle file
pub fn to_alass_timespans(&self, interval: i64) -> Vec<TimeSpan>
[src]
Convert TimeSpan
s from subparse
to alass_core
representation
Trait Implementations
impl<'_> From<&'_ VoiceActivity> for TimeSpans
[src]
Analyze vector of voice-activity data and produce TimeSpans
fn from(activity: &VoiceActivity) -> TimeSpans
[src]
impl IntoIterator for TimeSpans
[src]
Allow for iteration over internal subparse::TimeSpan
elements
type Item = SubTimeSpan
The type of the elements being iterated over.
type IntoIter = IntoIter<Self::Item>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
impl<'_> TryFrom<&'_ [u8]> for TimeSpans
[src]
Deserializes TimeSpans
instance from raw bytes
type Error = Error
The type returned in the event of a conversion error.
fn try_from(bytes: &[u8]) -> Result<Self, Self::Error>
[src]
impl<'a> TryInto<Vec<u8>> for &'a TimeSpans
[src]
Serializes TimeSpans
instance to raw bytes
Auto Trait Implementations
impl RefUnwindSafe for TimeSpans
impl Send for TimeSpans
impl Sync for TimeSpans
impl Unpin for TimeSpans
impl UnwindSafe for TimeSpans
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<I> IntoIterator for I where
I: Iterator,
[src]
I: Iterator,
type Item = <I as Iterator>::Item
The type of the elements being iterated over.
type IntoIter = I
Which kind of iterator are we turning this into?
fn into_iter(self) -> I
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,