pub struct Lesson {
pub subject: String,
pub room: String,
pub teacher: String,
pub class_code: String,
pub day_index: usize,
pub period_index: usize,
}Expand description
A single lesson entry in the timetable.
Fields§
§subject: StringSubject name (e.g., “Mathematics”, “French”)
room: StringRoom code (e.g., “MA3”, “SC8”)
teacher: StringTeacher name (e.g., “Ms Test A”, “Mr Test B”)
class_code: StringClass code (e.g., “MA3”, “HU9”)
day_index: usizeDay of week (0-4 for Monday-Friday; weekends not included)
period_index: usizePeriod index (0 = PD, 1 = L1, 2 = L2, etc.)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Lesson
impl RefUnwindSafe for Lesson
impl Send for Lesson
impl Sync for Lesson
impl Unpin for Lesson
impl UnwindSafe for Lesson
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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