pub struct State { /* private fields */ }calendar only.Expand description
What the form holds. The end is kept at or after the start: moving the start moves the end with it, so the entry keeps its length. The last date of a repeat is kept on or after the start.
Implementations§
Source§impl State
impl State
Sourcepub fn new(draft: &Draft, time_zone: &TimeZone) -> Self
pub fn new(draft: &Draft, time_zone: &TimeZone) -> Self
A form for a new entry over the span the calendar asked for.
Sourcepub fn with_week_start(self, week_start: Weekday) -> Self
pub fn with_week_start(self, week_start: Weekday) -> Self
The day weeks start on in the date picker. Defaults to Monday.
Sourcepub fn week_start(&self) -> Weekday
pub fn week_start(&self) -> Weekday
The day weeks start on in the date picker.
pub fn is_new(&self) -> bool
pub fn title(&self) -> &str
pub fn is_all_day(&self) -> bool
pub fn repeats(&self) -> Repeats
pub fn stops(&self) -> Stops
Sourcepub fn count(&self) -> u32
pub fn count(&self) -> u32
How many occurrences there are, used when the repeat stops after a number of them. At least 1.
Sourcepub fn repeat(&self) -> Option<Repeat>
pub fn repeat(&self) -> Option<Repeat>
The repeat rule the form describes, or None when the entry does
not repeat.
pub fn tone(&self) -> Tone
Sourcepub fn colour(&self) -> Option<Color>
pub fn colour(&self) -> Option<Color>
The entry’s own colour, kept from the entry the form opened with until a tone is picked.
Sourcepub fn with_colour_label(self, label: impl Into<String>) -> Self
pub fn with_colour_label(self, label: impl Into<String>) -> Self
Names the entry’s own colour in the colour menu and the read-only
form, such as the name of the calendar it comes from. Without a
name it is CUSTOM_COLOUR. Blank text clears it.
pub fn colour_label(&self) -> Option<&str>
pub fn location(&self) -> &str
Sourcepub fn notes(&self) -> String
pub fn notes(&self) -> String
The notes as text. Notes the form opened with come back exactly as they were until they are edited; edited notes lose the space around them.
Sourcepub fn notes_content(&self) -> &Content
pub fn notes_content(&self) -> &Content
The notes buffer, for drawing the notes in a text area of the app’s own.
Sourcepub fn picker_month(&self) -> Option<Date>
pub fn picker_month(&self) -> Option<Date>
The month the open date picker shows, as its first day, or None
when no picker is open.
Sourcepub fn interval_text(&self) -> &str
pub fn interval_text(&self) -> &str
The text of the “every” field as typed, which may be blank.
Sourcepub fn count_text(&self) -> &str
pub fn count_text(&self) -> &str
The text of the “after” field as typed, which may be blank.
Sourcepub fn is_picking_until(&self) -> bool
pub fn is_picking_until(&self) -> bool
Whether the date picker for the last date of the repeat is open.
Sourcepub fn times(&self, field: Field) -> Vec<TimeOfDay>
pub fn times(&self, field: Field) -> Vec<TimeOfDay>
The times a field’s menu lists. The start’s is the whole day in
order. The end’s begins just after the start when both are on the
same day and carries on round midnight, so the times before the
start, which would end the entry the next day, come last. The menu
opens with the field’s time in the middle, filters as you type and
takes a typed time off the TIME_STEP grid.
Sourcepub fn entry(&self, new_id: EntryId) -> Entry
pub fn entry(&self, new_id: EntryId) -> Entry
The entry the form describes. A new entry takes new_id; a changed
one keeps its own, along with what the form does not show: its tag,
icon, emphasis and whether it is locked, movable or removable. A
blank title becomes UNTITLED.
pub fn update(&mut self, event: Event)
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for State
impl !RefUnwindSafe for State
impl !Sync for State
impl Forget for State
impl Move for State
impl Send for State
impl Unpin for State
impl UnsafeUnpin for Statewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const Entry is !null: UnsafeUnpin,
PhantomData<Entry>: UnsafeUnpin,
(): UnsafeUnpin,
*const u8: UnsafeUnpin,
impl UnwindSafe for State
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> 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.