Fields
x_min: i16
x_max: i16
y_min: i16
y_max: i16
Implementations
sourceimpl BoundingBox
impl BoundingBox
sourcepub fn from_points(points: &[Point]) -> Self
pub fn from_points(points: &[Point]) -> Self
Calculate xMin, xMax and yMin, yMax from a collection of Points
Panics if points
is empty.
Trait Implementations
sourceimpl Clone for BoundingBox
impl Clone for BoundingBox
sourcefn clone(&self) -> BoundingBox
fn clone(&self) -> BoundingBox
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for BoundingBox
impl Debug for BoundingBox
sourceimpl PartialEq<BoundingBox> for BoundingBox
impl PartialEq<BoundingBox> for BoundingBox
sourcefn eq(&self, other: &BoundingBox) -> bool
fn eq(&self, other: &BoundingBox) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &BoundingBox) -> bool
fn ne(&self, other: &BoundingBox) -> bool
This method tests for !=
.
sourceimpl<'a> ReadBinary<'a> for BoundingBox
impl<'a> ReadBinary<'a> for BoundingBox
type HostType = BoundingBox
fn read(ctxt: &mut ReadCtxt<'a>) -> Result<Self, ParseError>
sourceimpl<'a> WriteBinary<BoundingBox> for BoundingBox
impl<'a> WriteBinary<BoundingBox> for BoundingBox
sourcefn write<C: WriteContext>(
ctxt: &mut C,
bbox: BoundingBox
) -> Result<(), WriteError>
fn write<C: WriteContext>(
ctxt: &mut C,
bbox: BoundingBox
) -> Result<(), WriteError>
Write the binary representation of Self to ctxt
.
impl StructuralPartialEq for BoundingBox
Auto Trait Implementations
impl RefUnwindSafe for BoundingBox
impl Send for BoundingBox
impl Sync for BoundingBox
impl Unpin for BoundingBox
impl UnwindSafe for BoundingBox
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
sourceimpl<'a, T> ReadBinaryDep<'a> for T where
T: ReadBinary<'a>,
impl<'a, T> ReadBinaryDep<'a> for T where
T: ReadBinary<'a>,
type Args = ()
type HostType = <T as ReadBinary<'a>>::HostType
fn read_dep(
ctxt: &mut ReadCtxt<'a>,
<T as ReadBinaryDep<'a>>::Args
) -> Result<<T as ReadBinaryDep<'a>>::HostType, ParseError>
sourceimpl<T, HostType> WriteBinaryDep<HostType> for T where
T: WriteBinary<HostType>,
impl<T, HostType> WriteBinaryDep<HostType> for T where
T: WriteBinary<HostType>,
type Output = <T as WriteBinary<HostType>>::Output
type Output = <T as WriteBinary<HostType>>::Output
The type of the value returned by write_dep
.
sourcefn write_dep<C>(
ctxt: &mut C,
val: HostType,
<T as WriteBinaryDep<HostType>>::Args
) -> Result<<T as WriteBinaryDep<HostType>>::Output, WriteError> where
C: WriteContext,
fn write_dep<C>(
ctxt: &mut C,
val: HostType,
<T as WriteBinaryDep<HostType>>::Args
) -> Result<<T as WriteBinaryDep<HostType>>::Output, WriteError> where
C: WriteContext,
Write the binary representation of Self to ctxt
.