pub struct Vec2generic<T> {
pub x: T,
pub y: T,
}
Expand description
Generic Vector2.
Requires for the Type to derive Debug, Clone, PartialEq
and implement Default
trait
Doesn’t overload operators like the other Vector2s
Fields§
§x: T
X value.
y: T
Y value.
Implementations§
Source§impl<T: Clone> Vec2generic<T>
impl<T: Clone> Vec2generic<T>
Sourcepub fn new(x: T, y: T) -> Self
pub fn new(x: T, y: T) -> Self
Creates a new Vec2generic
with x and y defined.
use default()
for a default initialized.
Trait Implementations§
Source§impl<T: Clone> Clone for Vec2generic<T>
impl<T: Clone> Clone for Vec2generic<T>
Source§fn clone(&self) -> Vec2generic<T>
fn clone(&self) -> Vec2generic<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T: Debug> Debug for Vec2generic<T>
impl<T: Debug> Debug for Vec2generic<T>
Source§impl<T: Default> Default for Vec2generic<T>
impl<T: Default> Default for Vec2generic<T>
Source§fn default() -> Self
fn default() -> Self
Creates a new Vec2generic
with x and y initialized with the Type default.
Source§impl<T: PartialEq> PartialEq for Vec2generic<T>
impl<T: PartialEq> PartialEq for Vec2generic<T>
impl<T> StructuralPartialEq for Vec2generic<T>
Auto Trait Implementations§
impl<T> Freeze for Vec2generic<T>where
T: Freeze,
impl<T> RefUnwindSafe for Vec2generic<T>where
T: RefUnwindSafe,
impl<T> Send for Vec2generic<T>where
T: Send,
impl<T> Sync for Vec2generic<T>where
T: Sync,
impl<T> Unpin for Vec2generic<T>where
T: Unpin,
impl<T> UnwindSafe for Vec2generic<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