pub struct HostingView { /* private fields */ }Expand description
A hosting view whose root view can be replaced at any time.
Implementations§
Source§impl HostingView
impl HostingView
Sourcepub fn new(view: &ViewHandle) -> Self
pub fn new(view: &ViewHandle) -> Self
Wrap a view in a fresh hosting view.
Sourcepub fn set_root(&self, view: &ViewHandle)
pub fn set_root(&self, view: &ViewHandle)
Swap the root view. SwiftUI diffs the new tree against the old one and updates the rendered output in place — this is how a Rust-driven UI changes after it is on screen.
Sourcepub fn fitting_size(&self) -> (f64, f64)
pub fn fitting_size(&self) -> (f64, f64)
The size SwiftUI would like this view to be.
Trait Implementations§
Source§impl Drop for HostingView
impl Drop for HostingView
Auto Trait Implementations§
impl !Freeze for HostingView
impl !RefUnwindSafe for HostingView
impl !Send for HostingView
impl !Sync for HostingView
impl Unpin for HostingView
impl UnsafeUnpin for HostingView
impl UnwindSafe for HostingView
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