pub struct ViewInput {
pub bounds: Rect,
pub viewport: Size2D,
pub action: ViewAction,
}Expand description
Geometry and an action for a single model update.
Bounds have finite ordered endpoints and representable nonnegative extents. Viewport extents are positive and finite.
§Examples
use adam_web_ui::graph::{ViewAction, ViewInput};
use cel_euclid::{Rect, Size2D};
let input = ViewInput {
bounds: Rect::default(),
viewport: Size2D::new(400.0, 300.0),
action: ViewAction::Refresh,
};
assert!(input.viewport.width > 0.0);Fields§
§bounds: RectThe graph’s content bounds, including any renderer-provided margin.
viewport: Size2DThe measured viewport size.
action: ViewActionThe requested source operation.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ViewInput
impl RefUnwindSafe for ViewInput
impl Send for ViewInput
impl Sync for ViewInput
impl Unpin for ViewInput
impl UnsafeUnpin for ViewInput
impl UnwindSafe for ViewInput
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
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> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.