pub struct ViewParams {Show 13 fields
pub view_id: String,
pub width: u32,
pub height: u32,
pub aspect_ratio_mode: AspectRatioMode,
pub aspect_ratio_alignment_mode: AspectRatioAlignmentMode,
pub device_pixel_ratio: f32,
pub camera_view: Option<[f32; 16]>,
pub timeout: Option<u32>,
pub wait_for_store_gets: bool,
pub cache_enabled: bool,
pub margins: Option<MarginParams>,
pub stores: Option<HashMap<String, ZarrStoreInfo>>,
pub store_objects: Option<StoreMap>,
}Expand description
Shared rendering parameters at the view level (i.e., not layer-specific).
Fields§
§view_id: StringThe view ID.
width: u32§height: u32§aspect_ratio_mode: AspectRatioMode§aspect_ratio_alignment_mode: AspectRatioAlignmentMode§device_pixel_ratio: f32§camera_view: Option<[f32; 16]>The camera state, as a 4x4 matrix.
timeout: Option<u32>Timeout (in ms) before bailing out of awaiting a data request.
wait_for_store_gets: boolIf false, bail early (e.g., upon encountering a pending Promise) rather than waiting for data requests to resolve.
cache_enabled: boolAllow disabling memoization/cacheing.
margins: Option<MarginParams>Specify margins for plots that need them (e.g. scatterplot axes).
Subtract margins from view-level width/height to obtain layer-level width/height.
stores: Option<HashMap<String, ZarrStoreInfo>>Mapping from zarr store name to its metadata.
Keeping track of store metadata in parallel with the store instances in
[store_objects] enables serializing store info,
facilitating the render-to-script functionality.
store_objects: Option<StoreMap>Mapping from zarr store name to its zarrs store instance.
Not serialized.
Implementations§
Source§impl ViewParams
impl ViewParams
Sourcepub fn get_store(&self, store_name: &str) -> Arc<dyn AsyncReadableStorageTraits> ⓘ
pub fn get_store(&self, store_name: &str) -> Arc<dyn AsyncReadableStorageTraits> ⓘ
Given a Zarr store name, obtain the corresponding store instance from the ViewParams::store_objects hashmap.
Trait Implementations§
Source§impl Clone for ViewParams
impl Clone for ViewParams
Source§fn clone(&self) -> ViewParams
fn clone(&self) -> ViewParams
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 ViewParams
impl Debug for ViewParams
Source§impl Default for ViewParams
impl Default for ViewParams
Source§fn default() -> ViewParams
fn default() -> ViewParams
Source§impl<'de> Deserialize<'de> for ViewParams
impl<'de> Deserialize<'de> for ViewParams
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ViewParams, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ViewParams, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for ViewParams
impl Serialize for ViewParams
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 !RefUnwindSafe for ViewParams
impl !UnwindSafe for ViewParams
impl Freeze for ViewParams
impl Send for ViewParams
impl Sync for ViewParams
impl Unpin for ViewParams
impl UnsafeUnpin for ViewParams
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.