pub struct RendererEngine(/* private fields */);Expand description
The state object responsible for the active [JsPerspectiveViewerPlugin].
Implementations§
Source§impl Renderer
impl Renderer
pub fn new(viewer_elem: &HtmlElement) -> Self
pub async fn reset( &self, columns_config: Option<&HashMap<String, ColumnConfigValues>>, ) -> ApiResult<()>
pub fn delete(&self) -> ApiResult<()>
pub fn metadata(&self) -> Ref<'_, ViewConfigRequirements>
pub fn is_chart(&self) -> bool
Sourcepub fn get_all_plugins(&self) -> Vec<JsPerspectiveViewerPlugin>
pub fn get_all_plugins(&self) -> Vec<JsPerspectiveViewerPlugin>
Return all plugin instances, whether they are active or not. Useful for configuring all or specific plugins at application init.
Sourcepub fn get_all_plugin_categories(&self) -> HashMap<String, Vec<String>>
pub fn get_all_plugin_categories(&self) -> HashMap<String, Vec<String>>
Return all plugin names, whether they are active or not.
Sourcepub fn get_active_plugin(&self) -> ApiResult<JsPerspectiveViewerPlugin>
pub fn get_active_plugin(&self) -> ApiResult<JsPerspectiveViewerPlugin>
Gets the currently active plugin. Calling this method before a plugin has been selected will cause the default (first) plugin to be selected, and doing so when no plugins have been registered is an error.
Sourcepub fn get_plugin(&self, name: &str) -> ApiResult<JsPerspectiveViewerPlugin>
pub fn get_plugin(&self, name: &str) -> ApiResult<JsPerspectiveViewerPlugin>
pub fn is_plugin_activated(&self) -> ApiResult<bool>
pub async fn restyle_all(&self, view: &View) -> ApiResult<JsValue>
pub fn set_throttle(&self, val: Option<f64>)
pub fn set_selection(&self, window: Option<ViewWindow>)
pub fn get_selection(&self) -> Option<ViewWindow>
pub fn disable_active_plugin_render_warning(&self)
pub fn get_next_plugin_metadata( &self, update: &PluginUpdate, ) -> Option<ViewConfigRequirements>
pub fn apply_pending_plugin(&self) -> ApiResult<bool>
pub async fn with_lock<T>( self, task: impl Future<Output = ApiResult<T>>, ) -> ApiResult<T>
pub async fn resize(&self) -> ApiResult<()>
pub async fn resize_with_dimensions( &self, width: f64, height: f64, ) -> ApiResult<()>
Sourcepub async fn draw(
&self,
session: impl Future<Output = ApiResult<Option<View>>>,
) -> ApiResult<()>
pub async fn draw( &self, session: impl Future<Output = ApiResult<Option<View>>>, ) -> ApiResult<()>
This will take a future which should create a new view and then will
draw it. As the session closure is asynchronous, it can be cancelled
by returning None.
Sourcepub async fn update(&self, session: Option<View>) -> ApiResult<()>
pub async fn update(&self, session: Option<View>) -> ApiResult<()>
This will update an already existing view
Sourcepub async fn presize(
&self,
open: bool,
panel_task: impl Future<Output = ApiResult<()>>,
) -> ApiResult<JsValue>
pub async fn presize( &self, open: bool, panel_task: impl Future<Output = ApiResult<()>>, ) -> ApiResult<JsValue>
Decide whether to draw plugin or self first based on whether the panel
is opening or closing, then draw with a timeout. If the timeout
triggers, draw self and resolve on_toggle but still await the
completion of the draw task.
pub fn render_timer(&self) -> MovingWindowRenderTimer
Trait Implementations§
Source§impl ImplicitClone for Renderer
impl ImplicitClone for Renderer
Source§fn implicit_clone(&self) -> Self
fn implicit_clone(&self) -> Self
Auto Trait Implementations§
impl Freeze for Renderer
impl !RefUnwindSafe for Renderer
impl !Send for Renderer
impl !Sync for Renderer
impl Unpin for Renderer
impl UnsafeUnpin for Renderer
impl !UnwindSafe for Renderer
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
Source§fn into_prop_value(self) -> Option<T>
fn into_prop_value(self) -> Option<T>
self to a value of a Properties struct.Source§impl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
Source§fn into_prop_value(self) -> T
fn into_prop_value(self) -> T
self to a value of a Properties struct.