#[non_exhaustive]pub struct CursorView {
pub pos: Pos,
pub brightness: f32,
pub style: CursorStyle,
}Expand description
The cursor as shown on the map. Build it with CursorView::new
(ADR-0039).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.pos: PosThe tile it is on.
brightness: f32Where it is in its pulse: 1 = full brightness, down to about half.
style: CursorStyleThe player’s cursor style.
Implementations§
Source§impl CursorView
impl CursorView
Sourcepub const fn new(pos: Pos, brightness: f32, style: CursorStyle) -> Self
pub const fn new(pos: Pos, brightness: f32, style: CursorStyle) -> Self
The cursor on tile pos, at brightness in its pulse, drawn in
style.
Trait Implementations§
Source§impl Clone for CursorView
impl Clone for CursorView
Source§fn clone(&self) -> CursorView
fn clone(&self) -> CursorView
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CursorView
Source§impl Debug for CursorView
impl Debug for CursorView
Source§impl PartialEq for CursorView
impl PartialEq for CursorView
impl StructuralPartialEq for CursorView
Auto Trait Implementations§
impl Freeze for CursorView
impl RefUnwindSafe for CursorView
impl Send for CursorView
impl Sync for CursorView
impl Unpin for CursorView
impl UnsafeUnpin for CursorView
impl UnwindSafe for CursorView
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