pub struct Servo(Rc<ServoInner>);Expand description
An in-process handle to a Servo instance. Cloning the handle does not create a new instance
of Servo.
A Servo instance does everything necessary to render the web, primarily orchestrating the
interaction between JavaScript, CSS layout, rendering, and the client window.
Clients create an event loop to pump messages between the embedding application and various browser components.
Tuple Fields§
§0: Rc<ServoInner>Implementations§
Source§impl Servo
impl Servo
fn new(builder: ServoBuilder) -> Self
pub fn delegate(&self) -> Rc<dyn ServoDelegate>
pub fn set_delegate(&self, delegate: Rc<dyn ServoDelegate>)
Sourcepub fn initialize_gl_accelerated_media(
display: NativeDisplay,
api: GlApi,
context: GlContext,
)
pub fn initialize_gl_accelerated_media( display: NativeDisplay, api: GlApi, context: GlContext, )
EXPERIMENTAL: Intialize GL accelerated media playback. This currently only works on a limited number
of platforms. This should be run before calling Servo::new and creating the first WebView.
Sourcepub fn spin_event_loop(&self)
pub fn spin_event_loop(&self)
Spin the Servo event loop, which:
- Performs updates in the compositor, such as queued pinch zoom events
- Runs delebgate methods on all
WebViews andServoitself - Maybe update the rendered compositor output, but without swapping buffers.
pub fn setup_logging(&self)
pub fn create_memory_report(&self, snd: IpcSender<MemoryReportResult>)
pub fn constellation_sender(&self) -> Sender<EmbedderToConstellationMessage>
pub fn execute_webdriver_command(&self, command: WebDriverCommandMsg)
pub fn set_preference(&self, name: &str, value: PrefValue)
pub(crate) fn compositor<'a>(&'a self) -> Ref<'a, IOCompositor>
pub(crate) fn compositor_mut<'a>(&'a self) -> RefMut<'a, IOCompositor>
pub(crate) fn webviews_mut<'a>( &'a self, ) -> RefMut<'a, FxHashMap<WebViewId, Weak<RefCell<WebViewInner>>>>
pub(crate) fn constellation_proxy(&self) -> &ConstellationProxy
pub(crate) fn javascript_evaluator_mut<'a>( &'a self, ) -> RefMut<'a, JavaScriptEvaluator>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Servo
impl !RefUnwindSafe for Servo
impl !Send for Servo
impl !Sync for Servo
impl Unpin for Servo
impl !UnwindSafe for Servo
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Filterable for T
impl<T> Filterable for T
Source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
Creates a filterable data provider with the given name for debugging. 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