pub struct RenderApiSender {
    api_sender: Sender<ApiMsg>,
    scene_sender: Sender<SceneBuilderRequest>,
    low_priority_scene_sender: Sender<SceneBuilderRequest>,
    blob_image_handler: Option<Box<dyn BlobImageHandler>>,
    fonts: SharedFontResources,
}Expand description
Allows the API to communicate with WebRender.
This object is created along with the Renderer and it’s main use from a
user perspective is to create one or several RenderApi objects.
Fields§
§api_sender: Sender<ApiMsg>§scene_sender: Sender<SceneBuilderRequest>§low_priority_scene_sender: Sender<SceneBuilderRequest>§blob_image_handler: Option<Box<dyn BlobImageHandler>>§fonts: SharedFontResourcesImplementations§
Source§impl RenderApiSender
 
impl RenderApiSender
Sourcepub fn new(
    api_sender: Sender<ApiMsg>,
    scene_sender: Sender<SceneBuilderRequest>,
    low_priority_scene_sender: Sender<SceneBuilderRequest>,
    blob_image_handler: Option<Box<dyn BlobImageHandler>>,
    fonts: SharedFontResources,
) -> Self
 
pub fn new( api_sender: Sender<ApiMsg>, scene_sender: Sender<SceneBuilderRequest>, low_priority_scene_sender: Sender<SceneBuilderRequest>, blob_image_handler: Option<Box<dyn BlobImageHandler>>, fonts: SharedFontResources, ) -> Self
Used internally by the Renderer.
Sourcepub fn create_api(&self) -> RenderApi
 
pub fn create_api(&self) -> RenderApi
Creates a new resource API object with a dedicated namespace.
Sourcepub fn create_api_by_client(&self, namespace_id: IdNamespace) -> RenderApi
 
pub fn create_api_by_client(&self, namespace_id: IdNamespace) -> RenderApi
Creates a new resource API object with a dedicated namespace. Namespace id is allocated by client.
The function could be used only when WebRenderOptions::namespace_alloc_by_client is true. When the option is true, create_api() could not be used to prevent namespace id conflict.
Auto Trait Implementations§
impl Freeze for RenderApiSender
impl !RefUnwindSafe for RenderApiSender
impl Send for RenderApiSender
impl !Sync for RenderApiSender
impl Unpin for RenderApiSender
impl !UnwindSafe for RenderApiSender
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> 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 more