pub struct Browser<Window: WindowPortsMethods + ?Sized> {
current_url: Option<ServoUrl>,
browser_id: Option<BrowserId>,
browsers: Vec<BrowserId>,
title: Option<String>,
window: Rc<Window>,
event_queue: Vec<WindowEvent>,
clipboard_ctx: Option<ClipboardContext>,
shutdown_requested: bool,
}
Fields
current_url: Option<ServoUrl>
browser_id: Option<BrowserId>
id of the top level browsing context. It is unique as tabs are not supported yet. None until created.
browsers: Vec<BrowserId>
title: Option<String>
window: Rc<Window>
event_queue: Vec<WindowEvent>
clipboard_ctx: Option<ClipboardContext>
shutdown_requested: bool
Implementations
sourceimpl<Window> Browser<Window> where
Window: WindowPortsMethods + ?Sized,
impl<Window> Browser<Window> where
Window: WindowPortsMethods + ?Sized,
pub fn new(window: Rc<Window>) -> Browser<Window>
pub fn get_events(&mut self) -> Vec<WindowEvent>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
pub fn handle_window_events(&mut self, events: Vec<WindowEvent>)
pub fn shutdown_requested(&self) -> bool
sourcefn handle_key_from_window(&mut self, key_event: KeyboardEvent)
fn handle_key_from_window(&mut self, key_event: KeyboardEvent)
Handle key events before sending them to Servo.
fn platform_handle_key(&mut self, key_event: KeyboardEvent)
sourcefn handle_key_from_servo(&mut self, _: Option<BrowserId>, event: KeyboardEvent)
fn handle_key_from_servo(&mut self, _: Option<BrowserId>, event: KeyboardEvent)
Handle key events after they have been handled by Servo.
fn scroll_window_from_key(
&mut self,
scroll_location: ScrollLocation,
phase: TouchEventType
)
pub fn handle_servo_events(
&mut self,
events: Vec<(Option<BrowserId>, EmbedderMsg)>
)
Auto Trait Implementations
impl<Window> !RefUnwindSafe for Browser<Window>
impl<Window> !Send for Browser<Window>
impl<Window> !Sync for Browser<Window>
impl<Window: ?Sized> Unpin for Browser<Window>
impl<Window> !UnwindSafe for Browser<Window>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> MaybeBoxed<Box<T, Global>> for T
impl<T> MaybeBoxed<Box<T, Global>> for T
sourcefn maybe_boxed(self) -> Box<T, Global>
fn maybe_boxed(self) -> Box<T, Global>
Convert
sourceimpl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
sourcefn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert
sourceimpl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more