pub struct Mapping {
pub prefix: String,
pub bg_color: String,
pub fg_color: String,
pub map_id: String,
pub label: Option<String>,
}Expand description
Maps a room code prefix to visual styling and map element.
Used to color-code timetable cells and highlight map regions based on the room where a lesson takes place.
Fields§
§prefix: StringRoom code prefix to match (e.g., “MA” matches MA1, MA2, MA3, etc.)
bg_color: StringBackground color for cell and map (hex code, e.g., “#fcdcd8”)
fg_color: StringForeground/text color for labels (hex code, defaults to “#231f20”)
map_id: StringSVG element ID in map file to highlight
label: Option<String>Human-readable department label (e.g., “Maths”, “Science”)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Mapping
impl<'de> Deserialize<'de> for Mapping
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Mapping
impl RefUnwindSafe for Mapping
impl Send for Mapping
impl Sync for Mapping
impl Unpin for Mapping
impl UnwindSafe for Mapping
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> 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