pub struct OverlayHandle { /* private fields */ }Implementations§
Source§impl OverlayHandle
impl OverlayHandle
pub fn new() -> Self
pub fn show(&self, view: View) -> u64
pub fn show_with(&self, view: View, z_index: f32, pass_through: bool) -> u64
pub fn show_with_back( &self, view: View, z_index: f32, pass_through: bool, back_handler: BackHandler, ) -> u64
pub fn show_entry( &self, builder: Rc<dyn Fn() -> View>, z_index: f32, pass_through: bool, ) -> u64
pub fn show_entry_with_back( &self, builder: Rc<dyn Fn() -> View>, z_index: f32, pass_through: bool, back_handler: Option<BackHandler>, ) -> u64
Sourcepub fn show_guard(
&self,
builder: Rc<dyn Fn() -> View>,
z_index: f32,
pass_through: bool,
) -> OverlayGuard
pub fn show_guard( &self, builder: Rc<dyn Fn() -> View>, z_index: f32, pass_through: bool, ) -> OverlayGuard
Show builder and return a guard owning the entry. Dropping the
guard dismisses the entry; see OverlayGuard.
pub fn show_guard_with_back( &self, builder: Rc<dyn Fn() -> View>, z_index: f32, pass_through: bool, back_handler: BackHandler, ) -> OverlayGuard
pub fn handle_back(&self) -> bool
Sourcepub fn has_back_handler(&self) -> bool
pub fn has_back_handler(&self) -> bool
Whether any overlay registered a back handler.
Used by platform runners to decide whether back should reach the system at all; the handler itself is only run on an actual press.
Sourcepub fn entry_count(&self) -> usize
pub fn entry_count(&self) -> usize
Number of live entries. Reads state directly rather than going through
Self::host, which rebuilds every entry and so cannot be used to
observe what is registered.
pub fn dismiss(&self, id: u64) -> bool
pub fn clear(&self)
Trait Implementations§
Source§impl Clone for OverlayHandle
impl Clone for OverlayHandle
Auto Trait Implementations§
impl !RefUnwindSafe for OverlayHandle
impl !Send for OverlayHandle
impl !Sync for OverlayHandle
impl !UnwindSafe for OverlayHandle
impl Forget for OverlayHandle
impl Freeze for OverlayHandle
impl Move for OverlayHandle
impl Unpin for OverlayHandle
impl UnsafeUnpin for OverlayHandlewhere
*const RcInner<RefCell<OverlayState>> is !null: UnsafeUnpin,
PhantomData<RcInner<RefCell<OverlayState>>>: UnsafeUnpin,
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