pub enum Language {
Rust,
CSharp,
Java,
Python,
}Expand description
A language a solution can be written in.
Variants§
Rust
Rust, scaffolded and driven through Cargo.
CSharp
C#, scaffolded and driven through the .NET SDK.
Java
Java, compiled with javac and run with java.
Python
Python, run directly by the interpreter.
Implementations§
Source§impl Language
impl Language
Sourcepub const fn name(self) -> &'static str
pub const fn name(self) -> &'static str
The language’s canonical lowercase name, as used on the command line and in path templates.
Sourcepub fn base_file(self, config_dir: &Path) -> PathBuf
pub fn base_file(self, config_dir: &Path) -> PathBuf
The optional starting-point file copied over a freshly scaffolded
project, for example ~/.config/aoc/base/rust.
Sourcepub fn entry_file(self, project: &Path) -> PathBuf
pub fn entry_file(self, project: &Path) -> PathBuf
The file inside a project that holds the solution.
Sourcepub fn commands(self, project: &Path) -> Result<LanguageCommands, ProcessError>
pub fn commands(self, project: &Path) -> Result<LanguageCommands, ProcessError>
Builds every command needed to work with a project in this language.
§Errors
Returns ProcessError::NoDirectoryName if a command needs the
project’s directory name but project has none, such as a filesystem
root or a path ending in ...
Trait Implementations§
impl Copy for Language
impl Eq for Language
impl StructuralPartialEq for Language
Auto Trait Implementations§
impl Freeze for Language
impl RefUnwindSafe for Language
impl Send for Language
impl Sync for Language
impl Unpin for Language
impl UnsafeUnpin for Language
impl UnwindSafe for Language
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.