pub enum SegmentAnimation {
FlashDecay,
Comet(CometDirection),
Wipe,
}Expand description
A built-in effect that plays once and ends, for a segment.
Anchored to the Instant an event happened, these are the animations
reached through SegmentHandle:
map.segment(id)?.flash(t). The widget drops the notification and stops
repainting once the effect finishes. See crate::map::animation for
what each looks like and how long it runs.
Ignored when a SegmentTemplate is installed — the template’s
segment_notification_ui takes over. The effect stays reachable there
through Animation.
Variants§
FlashDecay
A brief bright flash on the line that fades back out. The segment
analogue of NodeAnimation::Pulse — reads as “something happened on
this route”.
Comet(CometDirection)
A single dot pass from one endpoint to the other, then gone — the
event-driven counterpart to SteadySegmentAnimation::Comet. Reads
as “one thing moved along this route just now”, direction included,
rather than “traffic keeps flowing this way”.
Wipe
The line drawing itself in from the first endpoint to the second, then gone. Reads as “this route was just established” rather than “something travelled along it”.
Trait Implementations§
Source§impl Clone for SegmentAnimation
impl Clone for SegmentAnimation
Source§fn clone(&self) -> SegmentAnimation
fn clone(&self) -> SegmentAnimation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for SegmentAnimation
Source§impl Debug for SegmentAnimation
impl Debug for SegmentAnimation
Source§impl Default for SegmentAnimation
impl Default for SegmentAnimation
Source§fn default() -> SegmentAnimation
fn default() -> SegmentAnimation
impl Eq for SegmentAnimation
Source§impl PartialEq for SegmentAnimation
impl PartialEq for SegmentAnimation
impl StructuralPartialEq for SegmentAnimation
Auto Trait Implementations§
impl Freeze for SegmentAnimation
impl RefUnwindSafe for SegmentAnimation
impl Send for SegmentAnimation
impl Sync for SegmentAnimation
impl Unpin for SegmentAnimation
impl UnsafeUnpin for SegmentAnimation
impl UnwindSafe for SegmentAnimation
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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