pub struct ViewportConstraints {
pub viewport_size: Option<CanvasSize>,
pub translate_extent: Option<CanvasRect>,
}Expand description
Optional pan constraints for a viewport transform.
Fields§
§viewport_size: Option<CanvasSize>§translate_extent: Option<CanvasRect>Implementations§
Source§impl ViewportConstraints
impl ViewportConstraints
pub fn unconstrained() -> Self
pub fn with_translate_extent( viewport_size: CanvasSize, translate_extent: CanvasRect, ) -> Self
Trait Implementations§
Source§impl Clone for ViewportConstraints
impl Clone for ViewportConstraints
Source§fn clone(&self) -> ViewportConstraints
fn clone(&self) -> ViewportConstraints
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 moreimpl Copy for ViewportConstraints
Source§impl Debug for ViewportConstraints
impl Debug for ViewportConstraints
Source§impl Default for ViewportConstraints
impl Default for ViewportConstraints
Source§fn default() -> ViewportConstraints
fn default() -> ViewportConstraints
Returns the “default value” for a type. Read more
Source§impl PartialEq for ViewportConstraints
impl PartialEq for ViewportConstraints
Source§fn eq(&self, other: &ViewportConstraints) -> bool
fn eq(&self, other: &ViewportConstraints) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ViewportConstraints
Auto Trait Implementations§
impl Freeze for ViewportConstraints
impl RefUnwindSafe for ViewportConstraints
impl Send for ViewportConstraints
impl Sync for ViewportConstraints
impl Unpin for ViewportConstraints
impl UnsafeUnpin for ViewportConstraints
impl UnwindSafe for ViewportConstraints
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