Struct compositing::webview::WebViewManager
source · pub struct WebViewManager<WebView> {
webviews: HashMap<WebViewId, WebView>,
painting_order: Vec<WebViewId>,
}
Fields§
§webviews: HashMap<WebViewId, WebView>
Our top-level browsing contexts. In the WebRender scene, their pipelines are the children of a single root pipeline that also applies any pinch zoom transformation.
painting_order: Vec<WebViewId>
The order to paint them in, topmost last.
Implementations§
source§impl<WebView> WebViewManager<WebView>
impl<WebView> WebViewManager<WebView>
pub fn add( &mut self, webview_id: WebViewId, webview: WebView, ) -> Result<&mut WebView, WebViewAlreadyExists>
pub fn remove( &mut self, webview_id: WebViewId, ) -> Result<WebView, UnknownWebView>
pub fn get(&self, webview_id: WebViewId) -> Option<&WebView>
pub fn get_mut(&mut self, webview_id: WebViewId) -> Option<&mut WebView>
sourcepub fn show(&mut self, webview_id: WebViewId) -> Result<bool, UnknownWebView>
pub fn show(&mut self, webview_id: WebViewId) -> Result<bool, UnknownWebView>
Returns true iff the painting order actually changed.
sourcepub fn hide(&mut self, webview_id: WebViewId) -> Result<bool, UnknownWebView>
pub fn hide(&mut self, webview_id: WebViewId) -> Result<bool, UnknownWebView>
Returns true iff the painting order actually changed.
sourcepub fn raise_to_top(
&mut self,
webview_id: WebViewId,
) -> Result<bool, UnknownWebView>
pub fn raise_to_top( &mut self, webview_id: WebViewId, ) -> Result<bool, UnknownWebView>
Returns true iff the painting order actually changed.
pub fn painting_order(&self) -> impl Iterator<Item = (&WebViewId, &WebView)>
Trait Implementations§
source§impl<WebView: Debug> Debug for WebViewManager<WebView>
impl<WebView: Debug> Debug for WebViewManager<WebView>
source§impl<WebView: Default> Default for WebViewManager<WebView>
impl<WebView: Default> Default for WebViewManager<WebView>
source§fn default() -> WebViewManager<WebView>
fn default() -> WebViewManager<WebView>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<WebView> Freeze for WebViewManager<WebView>
impl<WebView> RefUnwindSafe for WebViewManager<WebView>where
WebView: RefUnwindSafe,
impl<WebView> Send for WebViewManager<WebView>where
WebView: Send,
impl<WebView> Sync for WebViewManager<WebView>where
WebView: Sync,
impl<WebView> Unpin for WebViewManager<WebView>where
WebView: Unpin,
impl<WebView> UnwindSafe for WebViewManager<WebView>where
WebView: UnwindSafe,
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
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 moresource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian()
.