pub struct MirrorRecorderManager { /* private fields */ }Expand description
Owns and supervises the per-camera mirror recorder tasks.
Implementations§
Source§impl MirrorRecorderManager
impl MirrorRecorderManager
pub fn new( pool: SqlitePool, cfg: Arc<Config>, mirror_root: PathBuf, ) -> Arc<Self>
Sourcepub async fn start_all(self: &Arc<Self>) -> Result<()>
pub async fn start_all(self: &Arc<Self>) -> Result<()>
Start mirror recorders for every camera that should mirror.
Sourcepub async fn reconcile(self: &Arc<Self>, camera_id: &str)
pub async fn reconcile(self: &Arc<Self>, camera_id: &str)
Reconcile a single camera’s mirror recorder against its current DB state (stop, then restart
when it should mirror). Mirroring is continuous and independent of the recording schedule, so
this only depends on should_record() + mirror_enabled.
Auto Trait Implementations§
impl !Freeze for MirrorRecorderManager
impl !RefUnwindSafe for MirrorRecorderManager
impl !UnwindSafe for MirrorRecorderManager
impl Send for MirrorRecorderManager
impl Sync for MirrorRecorderManager
impl Unpin for MirrorRecorderManager
impl UnsafeUnpin for MirrorRecorderManager
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<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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