pub struct SamplerManager { /* private fields */ }Expand description
Owns and supervises the per-(camera,profile) frame samplers.
Implementations§
Source§impl SamplerManager
impl SamplerManager
pub fn new(pool: SqlitePool, cfg: Arc<Config>) -> Arc<Self>
pub async fn start_all(self: &Arc<Self>)
Sourcepub async fn reconcile(self: &Arc<Self>)
pub async fn reconcile(self: &Arc<Self>)
React to AI-task / camera changes: recompute the budget and (re)start samplers.
Sourcepub async fn statuses(&self) -> Vec<SamplerInfo>
pub async fn statuses(&self) -> Vec<SamplerInfo>
Per-(camera,profile) sampler status (state + effective fps).
pub async fn shutdown(self: &Arc<Self>)
Source§impl SamplerManager
impl SamplerManager
Sourcepub fn frame_path(&self, camera_id: &str, profile: &str) -> PathBuf
pub fn frame_path(&self, camera_id: &str, profile: &str) -> PathBuf
Filesystem path of the latest sampled frame for a (camera, profile).
Auto Trait Implementations§
impl !Freeze for SamplerManager
impl !RefUnwindSafe for SamplerManager
impl !UnwindSafe for SamplerManager
impl Send for SamplerManager
impl Sync for SamplerManager
impl Unpin for SamplerManager
impl UnsafeUnpin for SamplerManager
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