pub struct RawRenderParams {Show 24 fields
pub schema_version: Option<String>,
pub width: u32,
pub height: u32,
pub format: GraphicsFormat,
pub device_pixel_ratio: f32,
pub camera_view: Option<[f32; 16]>,
pub aspect_ratio_mode: AspectRatioMode,
pub aspect_ratio_alignment_mode: AspectRatioAlignmentMode,
pub view_mode: ViewMode,
pub plot_params: PlotParams,
pub plot_id: String,
pub stores: Option<HashMap<String, ZarrStoreInfo>>,
pub wait_for_store_gets: bool,
pub timeout: Option<u32>,
pub cache_enabled: bool,
pub svg_compression_enabled: bool,
pub svg_include_document: bool,
pub margin_left: Option<f32>,
pub margin_right: Option<f32>,
pub margin_top: Option<f32>,
pub margin_bottom: Option<f32>,
pub pickable: bool,
pub render_backend: Option<RenderBackend>,
pub compute_backend: Option<ComputeBackend>,
}Expand description
The params that are passed to the crate::render::render function.
Fields§
§schema_version: Option<String>To enable forward compatibility, specify the schema version that was used to generate the plot. For now, we will just specify the crate version, and will throw a warning if there is a mismatch. We will not fully error, nor will we initially implement any auto-upgrade functionality to convert a prior version to a later version, but we could implement these features in the future. TODO: In the future, we should also decouple the schema_version from the crate/package version, as the latter could advance more quickly than the former.
width: u32The width of the plot, in pixels.
height: u32The height of the plot, in pixels.
format: GraphicsFormatFormat to use for outputs.
device_pixel_ratio: f32§camera_view: Option<[f32; 16]>The 4x4 camera matrix.
aspect_ratio_mode: AspectRatioMode§aspect_ratio_alignment_mode: AspectRatioAlignmentMode§view_mode: ViewMode§plot_params: PlotParams§plot_id: StringThe plot ID is used for cacheing of intermediate values per plot, and should therefore be unique among plots in the same application.
stores: Option<HashMap<String, ZarrStoreInfo>>Zarr stores, keyed by store name, defined once at the top level so that multiple layers can refer to the same store (and its metadata, such as which URL/path it points at and any store extensions it requires).
Every Zarr-based layer identifies the store it reads from via a
store_name field, which must be present in the keys of this map. As an
ergonomic shortcut, a layer may omit store_name when exactly one store
is defined here, in which case that single store is used. See
crate::render_traits::resolve_store_name.
The language bindings (bindings-js, bindings-python, bindings-r)
use each ZarrStoreInfo to construct the concrete store object and
register it under its name before rendering, so that Rust’s
zarr_-prefixed bound functions can resolve (store_name, key) lookups.
wait_for_store_gets: boolWhether to wait for store.get and store.getRange async calls to resolve.
If true, we will try to wait for .get/.getRange async calls to resolve (BUT we will still bail early if timeout elapses first).
If false, proceed to rendering something partially, without waiting for all .get/.getRange async calls to successfully resolve.
timeout: Option<u32>Timeout in ms before bailing out of awaiting a data request.
cache_enabled: boolAllow disabling memoization/cacheing. Useful for testing/debugging.
svg_compression_enabled: boolWhether to compress the SVG string using LZ-string if the output format is Vector.
svg_include_document: boolWhether to include the parent <svg> document tag,
versus only the inner <g> group/contents.
margin_left: Option<f32>Margins for plots that need them (e.g. scatterplot axes).
margin_right: Option<f32>§margin_top: Option<f32>§margin_bottom: Option<f32>§pickable: boolPickable determines whether an extra render target is created/used to facilitate picking, but will only be true in certain situations (e.g., interactive plots).
render_backend: Option<RenderBackend>Whether to use GPU or CPU for rendering. If None, try GPU, then fallback to CPU.
compute_backend: Option<ComputeBackend>Whether to use GPU or CPU for compute operations. If None, try GPU, then fallback to CPU.
Trait Implementations§
Source§impl Clone for RenderParams
impl Clone for RenderParams
Source§fn clone(&self) -> RenderParams
fn clone(&self) -> RenderParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RenderParams
impl Debug for RenderParams
Source§impl Default for RenderParams
impl Default for RenderParams
Source§fn default() -> RenderParams
fn default() -> RenderParams
Source§impl<'de> Deserialize<'de> for RenderParamswhere
RenderParams: Default,
impl<'de> Deserialize<'de> for RenderParamswhere
RenderParams: Default,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RenderParams, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<RenderParams, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for RenderParams
impl Serialize for RenderParams
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for RenderParams
impl RefUnwindSafe for RenderParams
impl Send for RenderParams
impl Sync for RenderParams
impl Unpin for RenderParams
impl UnsafeUnpin for RenderParams
impl UnwindSafe for RenderParams
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
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> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.