pub struct LocalSignal { /* private fields */ }Expand description
A recording in this process, its min/max Pyramid (a file for recordings of at least
FILE_PYRAMID_MIN_BYTES, else memory) and the builder that fills it in the background,
nearest the focus first. The recording is read once to build the pyramid, while views already
draw from it.
Implementations§
Source§impl LocalSignal
impl LocalSignal
Sourcepub fn open(
source: Arc<dyn RecordingSource>,
recording: Option<(&Path, &str)>,
) -> DspResult<Self>
pub fn open( source: Arc<dyn RecordingSource>, recording: Option<(&Path, &str)>, ) -> DspResult<Self>
source, with the pyramid of source id of the recording file path when given: the
complete file next to it, else (large recordings) a new file there, else memory.
Sourcepub fn source(&self) -> &Arc<dyn RecordingSource> ⓘ
pub fn source(&self) -> &Arc<dyn RecordingSource> ⓘ
The recording.
Trait Implementations§
Source§impl Drop for LocalSignal
impl Drop for LocalSignal
Source§impl SignalBackend for LocalSignal
impl SignalBackend for LocalSignal
Source§fn info(&self) -> &RecordingInfo
fn info(&self) -> &RecordingInfo
The recording’s description (channels, samples, exact rate and start, units).
Source§fn view(&self, view: &View, out: &mut Envelope) -> DspResult<()>
fn view(&self, view: &View, out: &mut Envelope) -> DspResult<()>
The contents of
view into out (its buffer is reused). Zoomed-out columns not built yet
are NaN and complete is false: ask again after Self::watch reports progress.Source§fn read(
&self,
channels: &[usize],
samples: Range<u64>,
out: &mut [f32],
) -> DspResult<()>
fn read( &self, channels: &[usize], samples: Range<u64>, out: &mut [f32], ) -> DspResult<()>
Samples
samples of channels, channel-major (e.g. the value under the cursor).Source§fn focus(&self, sample: u64)
fn focus(&self, sample: u64)
The viewer looks at sample
sample: zoomed-out data there is prepared first.Source§fn prepare(&self, start: u64, end: u64) -> DspResult<()>
fn prepare(&self, start: u64, end: u64) -> DspResult<()>
Prepares the zoomed-out data of samples
start..end now, blocking until it is ready (for
a single exact image, e.g. a snapshot; viewers use Self::focus).Source§fn progress(&self) -> Progress
fn progress(&self) -> Progress
Samples whose zoomed-out data is ready, of all (
done == total once complete).Source§fn watch(&self, on_progress: OnProgress)
fn watch(&self, on_progress: OnProgress)
Calls
on_progress whenever more zoomed-out data is ready.Auto Trait Implementations§
impl !Freeze for LocalSignal
impl !RefUnwindSafe for LocalSignal
impl !UnwindSafe for LocalSignal
impl Forget for LocalSignal
impl Move for LocalSignal
impl Send for LocalSignal
impl Sync for LocalSignal
impl Unpin for LocalSignal
impl UnsafeUnpin for LocalSignal
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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