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.
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
pub fn location(&self) -> &str
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 begins an hour before the time chosen; the end’s begins just after the start when both are on the same day, since nothing earlier would be on that day.
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. 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 State
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.