pub struct NodeKitLayoutHints {
pub full_zoom_min: f32,
pub compact_zoom_min: f32,
pub field_spacing: Option<f32>,
pub action_spacing: Option<f32>,
pub measurement_note: Option<String>,
}Expand description
Zoom and spacing hints a kit can publish to adapters.
Fields§
§full_zoom_min: f32Zoom threshold where full content should be visible.
compact_zoom_min: f32Zoom threshold where compact content should be visible.
field_spacing: Option<f32>Default vertical spacing between field rows.
action_spacing: Option<f32>Default vertical spacing between action rows.
measurement_note: Option<String>Human-readable measurement guidance for adapters.
Implementations§
Source§impl NodeKitLayoutHints
impl NodeKitLayoutHints
pub fn with_full_zoom_min(self, zoom_min: f32) -> Self
pub fn with_compact_zoom_min(self, zoom_min: f32) -> Self
pub fn with_zoom_range(self, compact_zoom_min: f32, full_zoom_min: f32) -> Self
pub fn with_field_spacing(self, spacing: f32) -> Self
pub fn with_action_spacing(self, spacing: f32) -> Self
pub fn with_measurement_note(self, note: impl Into<String>) -> Self
pub fn content_density_for_zoom(&self, zoom: f32) -> NodeKitContentDensity
Trait Implementations§
Source§impl Clone for NodeKitLayoutHints
impl Clone for NodeKitLayoutHints
Source§fn clone(&self) -> NodeKitLayoutHints
fn clone(&self) -> NodeKitLayoutHints
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NodeKitLayoutHints
impl Debug for NodeKitLayoutHints
Source§impl Default for NodeKitLayoutHints
impl Default for NodeKitLayoutHints
Source§impl<'de> Deserialize<'de> for NodeKitLayoutHints
impl<'de> Deserialize<'de> for NodeKitLayoutHints
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for NodeKitLayoutHints
impl PartialEq for NodeKitLayoutHints
Source§fn eq(&self, other: &NodeKitLayoutHints) -> bool
fn eq(&self, other: &NodeKitLayoutHints) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for NodeKitLayoutHints
impl Serialize for NodeKitLayoutHints
impl StructuralPartialEq for NodeKitLayoutHints
Auto Trait Implementations§
impl Freeze for NodeKitLayoutHints
impl RefUnwindSafe for NodeKitLayoutHints
impl Send for NodeKitLayoutHints
impl Sync for NodeKitLayoutHints
impl Unpin for NodeKitLayoutHints
impl UnsafeUnpin for NodeKitLayoutHints
impl UnwindSafe for NodeKitLayoutHints
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