pub struct OverlayManager { /* private fields */ }Expand description
Manages a collection of title overlays for a project.
Implementations§
Source§impl OverlayManager
impl OverlayManager
Sourcepub fn add(&mut self, overlay: TitleOverlay) -> OverlayId
pub fn add(&mut self, overlay: TitleOverlay) -> OverlayId
Add an overlay and return its assigned ID.
Sourcepub fn remove(&mut self, id: OverlayId) -> Option<TitleOverlay>
pub fn remove(&mut self, id: OverlayId) -> Option<TitleOverlay>
Remove an overlay by ID.
Sourcepub fn get(&self, id: OverlayId) -> Option<&TitleOverlay>
pub fn get(&self, id: OverlayId) -> Option<&TitleOverlay>
Get a reference to an overlay.
Sourcepub fn get_mut(&mut self, id: OverlayId) -> Option<&mut TitleOverlay>
pub fn get_mut(&mut self, id: OverlayId) -> Option<&mut TitleOverlay>
Get a mutable reference.
Sourcepub fn active_at(&self, time: i64) -> Vec<&TitleOverlay>
pub fn active_at(&self, time: i64) -> Vec<&TitleOverlay>
Return all overlays active at time, sorted by ID for deterministic order.
Trait Implementations§
Source§impl Debug for OverlayManager
impl Debug for OverlayManager
Source§impl Default for OverlayManager
impl Default for OverlayManager
Source§fn default() -> OverlayManager
fn default() -> OverlayManager
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for OverlayManager
impl RefUnwindSafe for OverlayManager
impl Send for OverlayManager
impl Sync for OverlayManager
impl Unpin for OverlayManager
impl UnsafeUnpin for OverlayManager
impl UnwindSafe for OverlayManager
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> 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