Struct lighthouse_client::Pos
source · [−]Expand description
A position on the lighthouse display.
Fields
x: i32y: i32Implementations
sourceimpl Pos
impl Pos
sourcepub const fn new(x: i32, y: i32) -> Self
pub const fn new(x: i32, y: i32) -> Self
Creates a mew position. The parameters must be in bounds.
sourcepub fn add_wrapping(self, rhs: Delta) -> Self
pub fn add_wrapping(self, rhs: Delta) -> Self
Adds a delta to this position, wrapping around.
sourcepub fn sub_wrapping(self, rhs: Delta) -> Self
pub fn sub_wrapping(self, rhs: Delta) -> Self
Subtracts a delta from this position, wrapping around.
Trait Implementations
sourceimpl AddAssign<Delta> for Pos
impl AddAssign<Delta> for Pos
sourcefn add_assign(&mut self, rhs: Delta)
fn add_assign(&mut self, rhs: Delta)
Performs the
+= operation. Read moresourceimpl Distribution<Pos> for Standard
impl Distribution<Pos> for Standard
sourcefn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Pos
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Pos
Generate a random value of
T, using rng as the source of randomness.sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>where
R: Rng,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>where
R: Rng,
Create an iterator that generates random values of
T, using rng as
the source of randomness. Read moresourceimpl SubAssign<Delta> for Pos
impl SubAssign<Delta> for Pos
sourcefn sub_assign(&mut self, rhs: Delta)
fn sub_assign(&mut self, rhs: Delta)
Performs the
-= operation. Read moreimpl Copy for Pos
impl Eq for Pos
impl StructuralEq for Pos
impl StructuralPartialEq for Pos
Auto Trait Implementations
impl RefUnwindSafe for Pos
impl Send for Pos
impl Sync for Pos
impl Unpin for Pos
impl UnwindSafe for Pos
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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