pub struct SurfaceGroupModel { /* private fields */ }Expand description
Container for all active surfaces.
Implementations§
Source§impl SurfaceGroupModel
impl SurfaceGroupModel
pub fn new() -> Self
Sourcepub fn add_surface(&mut self, surface: SurfaceModel) -> Result<(), A2uiError>
pub fn add_surface(&mut self, surface: SurfaceModel) -> Result<(), A2uiError>
Add a surface. Returns error if surface ID already exists.
Sourcepub fn get_surface(&self, id: &str) -> Option<&SurfaceModel>
pub fn get_surface(&self, id: &str) -> Option<&SurfaceModel>
Get a surface by ID.
Sourcepub fn get_surface_mut(&mut self, id: &str) -> Option<&mut SurfaceModel>
pub fn get_surface_mut(&mut self, id: &str) -> Option<&mut SurfaceModel>
Get a mutable surface by ID.
Sourcepub fn surfaces(&self) -> impl Iterator<Item = &SurfaceModel>
pub fn surfaces(&self) -> impl Iterator<Item = &SurfaceModel>
Iterate over all surfaces.
Sourcepub fn surfaces_mut(&mut self) -> impl Iterator<Item = &mut SurfaceModel>
pub fn surfaces_mut(&mut self) -> impl Iterator<Item = &mut SurfaceModel>
Iterate mutably over all surfaces.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for SurfaceGroupModel
impl !Sync for SurfaceGroupModel
impl Freeze for SurfaceGroupModel
impl Send for SurfaceGroupModel
impl Unpin for SurfaceGroupModel
impl UnsafeUnpin for SurfaceGroupModel
impl UnwindSafe for SurfaceGroupModel
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