pub struct Point<N, Kind> {
pub x: N,
pub y: N,
// some fields omitted
}
Expand description
A point as defined by its x and y coordinates
impl<N: Coordinate, Kind> Point<N, Kind>
Convert this Point
to a Size
with the same coordinates
Checks that the coordinates are positive with a debug_assert!()
.
Convert this Point
to a Size
with the same coordinates
Ensures that the coordinates are positive by taking their absolute value
impl<N: Coordinate, Kind> Point<N, Kind>
Convert the underlying numerical type to f64 for floating point manipulations
Convert to i32 for integer-space manipulations by rounding float values
Convert to i32 for integer-space manipulations by flooring float values
Convert to i32 for integer-space manipulations by ceiling float values
Convert this logical point to physical coordinate space according to given scale factor
Convert this logical point to buffer coordinate space according to given scale factor
Convert this physical point to logical coordinate space according to given scale factor
Convert this physical point to logical coordinate space according to given scale factor
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
Convert Arc<Trait>
(where Trait: Downcast
) to Arc<Any>
. Arc<Any>
can then be
further downcast
into Arc<ConcreteType>
where ConcreteType
implements Trait
. Read more
impl<T, U> Into<U> for T where
U: From<T>,
The alignment of pointer.
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
Initializes a with the given initializer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
impl<V, T> VZip<V> for T where
V: MultiLane<T>,