pub struct SchedulerEvent {
pub id: u64,
pub resource: u64,
pub start: TimePoint,
pub end: TimePoint,
pub title: String,
pub tone: Tone,
pub done: bool,
pub locked: bool,
pub resizable: bool,
}Expand description
A bar on a Scheduler. One with no length shows as a milestone.
Fields§
§id: u64Given back when it changes.
resource: u64The row it is on.
start: TimePointWhen it begins.
end: TimePointWhen it ends.
title: StringWhat it is.
tone: ToneIts color; say what it means in the title or next to the scheduler too.
done: boolIt already happened, so it stands back.
locked: boolIt cannot be moved or resized.
resizable: boolIts length can change.
Implementations§
Source§impl SchedulerEvent
impl SchedulerEvent
Sourcepub fn new(
id: u64,
resource: u64,
start: TimePoint,
end: TimePoint,
title: impl Into<String>,
) -> SchedulerEvent
pub fn new( id: u64, resource: u64, start: TimePoint, end: TimePoint, title: impl Into<String>, ) -> SchedulerEvent
A bar on this row, from start to end.
Sourcepub fn tone(self, tone: Tone) -> SchedulerEvent
pub fn tone(self, tone: Tone) -> SchedulerEvent
Sets the color.
Sourcepub fn done(self, done: bool) -> SchedulerEvent
pub fn done(self, done: bool) -> SchedulerEvent
Marks it as already done.
Sourcepub fn locked(self, locked: bool) -> SchedulerEvent
pub fn locked(self, locked: bool) -> SchedulerEvent
Stops it being moved or resized.
Sourcepub fn resizable(self, resizable: bool) -> SchedulerEvent
pub fn resizable(self, resizable: bool) -> SchedulerEvent
Whether its length can change (on by default). It can still be moved.
Trait Implementations§
Source§impl Clone for SchedulerEvent
impl Clone for SchedulerEvent
Source§fn clone(&self) -> SchedulerEvent
fn clone(&self) -> SchedulerEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SchedulerEvent
impl Debug for SchedulerEvent
impl Eq for SchedulerEvent
Source§impl PartialEq for SchedulerEvent
impl PartialEq for SchedulerEvent
impl StructuralPartialEq for SchedulerEvent
Auto Trait Implementations§
impl Freeze for SchedulerEvent
impl RefUnwindSafe for SchedulerEvent
impl Send for SchedulerEvent
impl Sync for SchedulerEvent
impl Unpin for SchedulerEvent
impl UnsafeUnpin for SchedulerEvent
impl UnwindSafe for SchedulerEvent
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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
Mutably borrows from an owned value. Read more
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,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.