Expand description
Represents a rectangular boundary of Pt2D
points.
Fields
min_x: f64
min_y: f64
max_x: f64
max_y: f64
Implementations
sourceimpl Bounds
impl Bounds
pub fn zero() -> Self
sourcepub fn add_buffer(&mut self, sides: Distance)
pub fn add_buffer(&mut self, sides: Distance)
Expand the existing boundary by some distance evenly on all sides.
sourcepub fn get_rectangle(&self) -> Polygon
pub fn get_rectangle(&self) -> Polygon
Creates a rectangle covering this boundary.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Bounds
impl<'de> Deserialize<'de> for Bounds
sourcefn 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
impl Copy for Bounds
impl StructuralPartialEq for Bounds
Auto Trait Implementations
impl RefUnwindSafe for Bounds
impl Send for Bounds
impl Sync for Bounds
impl Unpin for Bounds
impl UnwindSafe for Bounds
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more