pub struct PresentationState { /* private fields */ }Expand description
Combines the control-ownership state machine with the current tab list, bumping a monotonic revision on every actual change — never on a no-op event or a re-set of identical tabs — so a subscriber never mistakes “I asked” for “it changed.”
Implementations§
Source§impl PresentationState
impl PresentationState
pub fn new() -> Self
pub fn control(&self) -> &ControlState
Sourcepub fn apply_control(&mut self, event: ControlEvent) -> Vec<ControlEffect>
pub fn apply_control(&mut self, event: ControlEvent) -> Vec<ControlEffect>
Apply one control-ownership event. Bumps revision iff the control
state actually changed as a result.
Sourcepub fn set_tabs(&mut self, tabs: Vec<TabInfo>)
pub fn set_tabs(&mut self, tabs: Vec<TabInfo>)
Replace the tab list — fed from ChromiumBackend::list_tabs() (or a
future subscribe_tabs() update). Bumps revision iff it actually
changed.
Sourcepub fn snapshot(&self) -> Presentation
pub fn snapshot(&self) -> Presentation
The current snapshot. Cheap to call repeatedly — only
apply_control/set_tabs advance revision, not this.
Trait Implementations§
Source§impl Clone for PresentationState
impl Clone for PresentationState
Source§impl Debug for PresentationState
impl Debug for PresentationState
Auto Trait Implementations§
impl Freeze for PresentationState
impl RefUnwindSafe for PresentationState
impl Send for PresentationState
impl Sync for PresentationState
impl Unpin for PresentationState
impl UnsafeUnpin for PresentationState
impl UnwindSafe for PresentationState
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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