pub struct DeckRaven { /* private fields */ }Expand description
A raven launched through the deck, flying toward a perch rect. The deck owns
one of these at a time (a fresh send_raven
replaces it) and drives it on a foreground layer.
Implementations§
Source§impl DeckRaven
impl DeckRaven
Sourcepub fn new(target: Rect, theme: &Theme) -> Self
pub fn new(target: Rect, theme: &Theme) -> Self
Build a raven aimed at target, launched from a sensible off-target point
(up-and-left of the perch) and tinted with the theme. The host can pass a
custom launch point with from.
Sourcepub fn from(self, start: Pos2) -> Self
pub fn from(self, start: Pos2) -> Self
Override the launch point (re-aims the flight at the same target).
Sourcepub fn is_perched(&self) -> bool
pub fn is_perched(&self) -> bool
True once the raven has landed on its perch.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DeckRaven
impl RefUnwindSafe for DeckRaven
impl Send for DeckRaven
impl Sync for DeckRaven
impl Unpin for DeckRaven
impl UnsafeUnpin for DeckRaven
impl UnwindSafe for DeckRaven
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