pub struct NodeHandle<'a> { /* private fields */ }Expand description
A borrowed node, obtained from Map::node, that an animation can be
attached to.
Modifiers such as NodeHandle::color come first; the effect method is the
terminal call that writes everything at once. A modifier on its own does
nothing, so there is no way to configure a notification that does not exist.
Effects come in two families, and which one you call decides how it ends:
pulse,ripple,countdown,scale_inandcrosshairplay once from theInstantyou pass and stop on their own.halo,blinkandorbitare lasting state: they run untilclear, and keep the app repainting the whole time.
A node can carry one of each at once; the state is drawn underneath the event.
Implementations§
Source§impl NodeHandle<'_>
impl NodeHandle<'_>
Sourcepub fn color(self, color: Color32) -> Self
pub fn color(self, color: Color32) -> Self
Overrides the colour of the effect about to be attached.
Without this the effect uses the current style’s alert_color.
Sourcepub fn ripple(self, at: Instant)
pub fn ripple(self, at: Instant)
Three staggered expanding rings. Reads as “activity is ongoing”.
Sourcepub fn countdown(self, at: Instant)
pub fn countdown(self, at: Instant)
A ring emptying clockwise. Reads as “how old is this information”.
Sourcepub fn scale_in(self, at: Instant)
pub fn scale_in(self, at: Instant)
A disc that overshoots and settles. For a node that just appeared.
Sourcepub fn crosshair(self, at: Instant)
pub fn crosshair(self, at: Instant)
Four ticks converging on the node. Reads as “target acquired”.
Sourcepub fn halo(self)
pub fn halo(self)
Lasting ring whose opacity breathes. Runs until Self::clear.
Sourcepub fn blink(self)
pub fn blink(self)
Lasting thick ring blinking on and off. Runs until Self::clear.
Sourcepub fn orbit(self)
pub fn orbit(self)
Lasting dot circling the node. Runs until Self::clear.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for NodeHandle<'a>
impl<'a> !Send for NodeHandle<'a>
impl<'a> !Sync for NodeHandle<'a>
impl<'a> !UnwindSafe for NodeHandle<'a>
impl<'a> Freeze for NodeHandle<'a>
impl<'a> Unpin for NodeHandle<'a>
impl<'a> UnsafeUnpin for NodeHandle<'a>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more