Struct wr::ExerciseDefinition
source · pub struct ExerciseDefinition { /* private fields */ }Implementations§
source§impl ExerciseDefinition
impl ExerciseDefinition
pub fn new( chapter_dir_name: &OsStr, exercise_dir_name: &OsStr ) -> Result<Self, Error>
sourcepub fn manifest_path(&self, exercises_dir: &Path) -> PathBuf
pub fn manifest_path(&self, exercises_dir: &Path) -> PathBuf
The path to the Cargo.toml file of the current exercise.
sourcepub fn manifest_folder_path(&self, exercises_dir: &Path) -> PathBuf
pub fn manifest_folder_path(&self, exercises_dir: &Path) -> PathBuf
The path to the folder containing the Cargo.toml file for the current exercise.
sourcepub fn exercise_number(&self) -> u16
pub fn exercise_number(&self) -> u16
The number of this exercise.
sourcepub fn chapter_number(&self) -> u16
pub fn chapter_number(&self) -> u16
The number of the chapter that contains this exercise.
Trait Implementations§
source§impl Clone for ExerciseDefinition
impl Clone for ExerciseDefinition
source§fn clone(&self) -> ExerciseDefinition
fn clone(&self) -> ExerciseDefinition
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Display for ExerciseDefinition
impl Display for ExerciseDefinition
source§impl Ord for ExerciseDefinition
impl Ord for ExerciseDefinition
source§impl PartialEq<OpenedExercise> for ExerciseDefinition
impl PartialEq<OpenedExercise> for ExerciseDefinition
source§fn eq(&self, other: &OpenedExercise) -> bool
fn eq(&self, other: &OpenedExercise) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialEq for ExerciseDefinition
impl PartialEq for ExerciseDefinition
source§fn eq(&self, other: &ExerciseDefinition) -> bool
fn eq(&self, other: &ExerciseDefinition) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd<OpenedExercise> for ExerciseDefinition
impl PartialOrd<OpenedExercise> for ExerciseDefinition
source§fn partial_cmp(&self, other: &OpenedExercise) -> Option<Ordering>
fn partial_cmp(&self, other: &OpenedExercise) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl PartialOrd for ExerciseDefinition
impl PartialOrd for ExerciseDefinition
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl Eq for ExerciseDefinition
impl StructuralEq for ExerciseDefinition
impl StructuralPartialEq for ExerciseDefinition
Auto Trait Implementations§
impl RefUnwindSafe for ExerciseDefinition
impl Send for ExerciseDefinition
impl Sync for ExerciseDefinition
impl Unpin for ExerciseDefinition
impl UnwindSafe for ExerciseDefinition
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
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§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.