Struct shape_core::Square
source · #[repr(C)]pub struct Square<T> {
pub x: T,
pub y: T,
pub s: T,
}
Expand description
Fields§
§x: T
The origin x points of the square.
y: T
The origin y points of the square.
s: T
The side length of the square.
Implementations§
Trait Implementations§
source§impl<'de, T> Deserialize<'de> for Square<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Square<T>where T: Deserialize<'de>,
source§fn 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
source§impl<T: PartialEq> PartialEq for Square<T>
impl<T: PartialEq> PartialEq for Square<T>
source§impl<T> Shape2D for Square<T>where
T: Signed + Clone + PartialOrd,
impl<T> Shape2D for Square<T>where T: Signed + Clone + PartialOrd,
§type VertexIterator<'a> = IntoIter<Point<T>>
where
T: 'a
type VertexIterator<'a> = IntoIter<Point<T>> where T: 'a
The value type of the shape.
§type LineIterator<'a> = IntoIter<Line<T>>
where
T: 'a
type LineIterator<'a> = IntoIter<Line<T>> where T: 'a
The value type of the shape.
source§fn vertices<'a>(&'a self, _: usize) -> Self::VertexIterator<'a>
fn vertices<'a>(&'a self, _: usize) -> Self::VertexIterator<'a>
Returns the owned vertices of the shape. Read more
source§fn edges<'a>(&'a self, _: usize) -> Self::LineIterator<'a>
fn edges<'a>(&'a self, _: usize) -> Self::LineIterator<'a>
Returns the owned edges of the shape.
impl<T: Copy> Copy for Square<T>
impl<T: Eq> Eq for Square<T>
impl<T> StructuralEq for Square<T>
impl<T> StructuralPartialEq for Square<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for Square<T>where T: RefUnwindSafe,
impl<T> Send for Square<T>where T: Send,
impl<T> Sync for Square<T>where T: Sync,
impl<T> Unpin for Square<T>where T: Unpin,
impl<T> UnwindSafe for Square<T>where T: UnwindSafe,
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