Struct NoTestsStudentFilePolicy

Source
pub struct NoTestsStudentFilePolicy { /* private fields */ }
Expand description

The no-tests policy considers all files to be student source files by default.

Trait Implementations§

Source§

impl StudentFilePolicy for NoTestsStudentFilePolicy

Source§

fn new_with_project_config(project_config: TmcProjectYml) -> Self
where Self: Sized,

This constructor should store the project config in the implementing struct.
Source§

fn get_project_config(&self) -> &TmcProjectYml

The policy should contain a TmcProjectYml parsed from the project this policy was created for.
Source§

fn is_non_extra_student_file(&self, _file_path: &Path) -> bool

Used by is_student_file. Defines a language plugin policy’s rules for determining whether a file is a student file or not.
Source§

fn new(project_dir: &Path) -> Result<Self, TmcError>
where Self: Sized,

Parses a project config and calls the helper constructor. Implementing types should only be constructed using this function.
Source§

fn is_student_file(&self, file_path: &Path) -> bool

Determines whether a file is a student source file. Read more
Source§

fn is_updating_forced(&self, path: &Path) -> Result<bool, TmcError>

Used to check for files which should always be overwritten. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.