pub enum PreviewLifecycle {
Idle,
Starting,
Running,
Stopping,
}Expand description
Lifecycle state of the camera preview pipeline.
Idle is the resting state. Starting/Stopping are transient
states that exist so a re-entrant start_preview call can detect
“already booting, drop the new one” instead of double-spawning gst
child processes. Running is the steady state.
Variants§
Idle
No pipeline running.
Starting
start_preview invoked but the pipeline isn’t producing
frames yet (gst spawn + first-frame latency).
Running
Pipeline is producing frames.
Stopping
stop_preview invoked but the gst child is still being
torn down. Transient — the click handler should drop into
Idle once the child has been reaped.
Implementations§
Source§impl PreviewLifecycle
impl PreviewLifecycle
Sourcepub fn try_start(self) -> Self
pub fn try_start(self) -> Self
Attempt to advance to Starting. Returns the previous state
(so callers can distinguish “started fresh” from “already
running, refused”).
Sourcepub fn mark_running(self) -> Self
pub fn mark_running(self) -> Self
Mark the pipeline as running (first frame received).
Sourcepub fn try_stop(self) -> Self
pub fn try_stop(self) -> Self
Begin teardown — moves Running → Stopping, or stays Idle if no pipeline is up.
Sourcepub fn finish_stop(self) -> Self
pub fn finish_stop(self) -> Self
Complete teardown — moves Stopping → Idle.
Trait Implementations§
Source§impl Clone for PreviewLifecycle
impl Clone for PreviewLifecycle
Source§fn clone(&self) -> PreviewLifecycle
fn clone(&self) -> PreviewLifecycle
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PreviewLifecycle
impl Debug for PreviewLifecycle
Source§impl Default for PreviewLifecycle
impl Default for PreviewLifecycle
Source§fn default() -> PreviewLifecycle
fn default() -> PreviewLifecycle
Source§impl<'de> Deserialize<'de> for PreviewLifecycle
impl<'de> Deserialize<'de> for PreviewLifecycle
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>,
Source§impl PartialEq for PreviewLifecycle
impl PartialEq for PreviewLifecycle
Source§fn eq(&self, other: &PreviewLifecycle) -> bool
fn eq(&self, other: &PreviewLifecycle) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for PreviewLifecycle
impl Serialize for PreviewLifecycle
impl Copy for PreviewLifecycle
impl Eq for PreviewLifecycle
impl StructuralPartialEq for PreviewLifecycle
Auto Trait Implementations§
impl Freeze for PreviewLifecycle
impl RefUnwindSafe for PreviewLifecycle
impl Send for PreviewLifecycle
impl Sync for PreviewLifecycle
impl Unpin for PreviewLifecycle
impl UnsafeUnpin for PreviewLifecycle
impl UnwindSafe for PreviewLifecycle
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<'de, D, R> CommandArg<'de, R> for Dwhere
D: Deserialize<'de>,
R: Runtime,
impl<'de, D, R> CommandArg<'de, R> for Dwhere
D: Deserialize<'de>,
R: Runtime,
§fn from_command(command: CommandItem<'de, R>) -> Result<D, InvokeError>
fn from_command(command: CommandItem<'de, R>) -> Result<D, InvokeError>
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().