Struct servo::Servo[][src]

pub struct Servo<Window: WindowMethods + 'static + ?Sized> {
    compositor: IOCompositor<Window>,
    constellation_chan: Sender<ConstellationMsg>,
    embedder_receiver: EmbedderReceiver,
    embedder_events: Vec<(Option<BrowserId>, EmbedderMsg)>,
    profiler_enabled: bool,
    _js_engine_setup: Option<JSEngineSetup>,

The in-process interface to Servo.

It does everything necessary to render the web, primarily orchestrating the interaction between JavaScript, CSS layout, rendering, and the client window.

Clients create a Servo instance for a given reference-counted type implementing WindowMethods, which is the bridge to whatever application Servo is embedded in. Clients then create an event loop to pump messages between the embedding application and various browser components.


compositor: IOCompositor<Window>constellation_chan: Sender<ConstellationMsg>embedder_receiver: EmbedderReceiverembedder_events: Vec<(Option<BrowserId>, EmbedderMsg)>profiler_enabled: bool_js_engine_setup: Option<JSEngineSetup>

For single-process Servo instances, this field controls the initialization and deinitialization of the JS Engine. Multiprocess Servo instances have their own instance that exists in the content process instead.


impl<Window: ?Sized> Servo<Window> where
    Window: WindowMethods + 'static, 

pub fn new(
    embedder: Box<dyn EmbedderMethods>,
    window: Rc<Window>,
    user_agent: Option<String>
) -> Servo<Window>

pub(crate) fn handle_window_event(&mut self, event: WindowEvent) -> bool[src]

pub(crate) fn receive_messages(&mut self)[src]

pub fn get_events(&mut self) -> Vec<(Option<BrowserId>, EmbedderMsg)>[src]

pub fn handle_events(&mut self, events: Vec<WindowEvent>) -> bool[src]

pub fn repaint_synchronously(&mut self)[src]

pub fn pinch_zoom_level(&self) -> f32[src]

pub fn setup_logging(&self)[src]

pub fn window(&self) -> &Window[src]

pub fn deinit(self)[src]

Auto Trait Implementations

impl<Window> !RefUnwindSafe for Servo<Window>

impl<Window> !Send for Servo<Window>

impl<Window> !Sync for Servo<Window>

impl<Window: ?Sized> Unpin for Servo<Window>

impl<Window> !UnwindSafe for Servo<Window>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> Erased for T[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> MaybeBoxed<Box<T, Global>> for T[src]

impl<T> MaybeBoxed<T> for T[src]

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,