pub struct Plan {
pub name: String,
pub courses: Vec<String>,
pub degree_id: String,
pub institution: Option<String>,
}Expand description
Represents a curriculum plan (graduation plan)
Fields§
§name: StringPlan name (e.g., “Standard CS Track”, “Honors Track”)
courses: Vec<String>Required courses - stored as course keys (e.g., “CS 2510”)
degree_id: StringAssociated degree identifier (e.g., “BS Computer Science”)
institution: Option<String>Institution name (optional, defaults to parent school)
Implementations§
Source§impl Plan
impl Plan
Sourcepub fn add_course(&mut self, course_key: String)
pub fn add_course(&mut self, course_key: String)
Sourcepub fn remove_course(&mut self, course_key: &str) -> bool
pub fn remove_course(&mut self, course_key: &str) -> bool
Sourcepub fn set_institution(&mut self, institution: String)
pub fn set_institution(&mut self, institution: String)
Set the institution name (for transfer plans)
Sourcepub const fn course_count(&self) -> usize
pub const fn course_count(&self) -> usize
Get total number of courses in the plan
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Plan
impl<'de> Deserialize<'de> for Plan
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
impl Eq for Plan
impl StructuralPartialEq for Plan
Auto Trait Implementations§
impl Freeze for Plan
impl RefUnwindSafe for Plan
impl Send for Plan
impl Sync for Plan
impl Unpin for Plan
impl UnwindSafe for Plan
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.