pub enum Event {
Show 22 variants
Show(View),
Next,
Previous,
Today,
GoTo(Date),
Press(Selection),
DoublePress(Selection),
Activate,
Clear,
MoveDay(i32),
NextEntry,
PreviousEntry,
OpenDay(Date),
Request(Draft),
Reschedule {
entry: EntryId,
start: Timestamp,
to: (Timestamp, Timestamp),
},
MoveDays {
entry: EntryId,
start: Timestamp,
days: i32,
},
Delete(EntryId),
Confirm,
Discard,
Insert(Entry),
Remove(EntryId),
Tick(Timestamp),
}calendar only.Expand description
Everything that changes the calendar.
Variants§
Show(View)
Next
Moves on by a month, a week or a day, whichever the view shows.
Previous
Today
Goes to today and selects it.
GoTo(Date)
Shows the period holding this date, without selecting anything.
Press(Selection)
A single press on a day, a time slot or an entry, which selects it.
A press on what is already selected activates it, as
Event::Activate does, unless
with_activate_on_second_press
turned that off.
DoublePress(Selection)
A double click or double tap: selects what was pressed and activates it, opening an entry or asking for a new one on a day or a time.
Activate
Activates the selection: an entry is opened, and a day or a time slot asks for a new entry there. With nothing selected it asks for one on the day on show.
Clear
Clears the selection.
MoveDay(i32)
Moves the selected day by this many days and follows it when it leaves the period on show.
NextEntry
Selects the next entry on the selected day, wrapping.
PreviousEntry
OpenDay(Date)
Shows one day, as the “more” count of a crowded day does.
Request(Draft)
A span dragged out on empty space.
Reschedule
An occurrence dragged or resized to a new time. start says which
occurrence; every occurrence of a repeating entry starts as far from
where it did as this one, and takes this one’s new length, so
resizing one edge resizes the series. A whole-day entry moves by the
days between the two starts.
MoveDays
An occurrence dragged by whole days, as in the month view and the
strip of whole-day entries. A timed entry keeps its time of day and
a whole-day entry its length in days. A repeating entry moves as a
whole. Like Reschedule, it is limited by
Allow and by entries that are locked or not
movable.
Delete(EntryId)
The user asked to remove an entry, such as with the Delete key.
It is limited by Allow and by entries that are locked or not
removable, and only proposed when
with_proposals is on.
Confirm
Applies the change waiting in State::pending.
Discard
Drops the change waiting in State::pending, leaving the entry
where it was.
Insert(Entry)
Adds an entry, or replaces the one with the same id. Always applies, and clears a pending change to the same entry.
Remove(EntryId)
Removes an entry. Always applies, and clears a pending change to it.
Tick(Timestamp)
The current time, for “today” and the now line.
Trait Implementations§
impl Eq for Event
impl StructuralPartialEq for Event
Auto Trait Implementations§
impl Forget for Event
impl Freeze for Eventwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const Marker is !null: Freeze,
PhantomData<Marker>: Freeze,
impl Move for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Eventwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const Marker is !null: UnsafeUnpin,
PhantomData<Marker>: UnsafeUnpin,
impl UnwindSafe for Eventwhere
RawVecInner: UnwindSafe,
BoxRaw<Marker>: UnwindSafe,
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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<State, Message> IntoBoot<State, Message> for State
impl<State, Message> IntoBoot<State, Message> for State
Source§fn into_boot(self) -> (State, Task<Message>)
fn into_boot(self) -> (State, Task<Message>)
Application.