pub enum ProjectLanguage {
CSharp,
FSharp,
VB,
}Expand description
Represents the language of a .NET project based on the file extension.
Variants§
Implementations§
Source§impl ProjectLanguage
impl ProjectLanguage
Sourcepub fn from_extension(extension: &OsStr) -> Option<Self>
pub fn from_extension(extension: &OsStr) -> Option<Self>
Determines the project language from the file extension.
The extension must be provided without a “.” (ex: “csproj”, “fsproj”, “vbproj”).
§Arguments
extension- A reference to anOsStrrepresenting the file extension.
§Returns
An Option<ProjectLanguage> containing the project language if it could be determined, otherwise None.
Trait Implementations§
Source§impl Clone for ProjectLanguage
impl Clone for ProjectLanguage
Source§fn clone(&self) -> ProjectLanguage
fn clone(&self) -> ProjectLanguage
Returns a duplicate 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 Debug for ProjectLanguage
impl Debug for ProjectLanguage
Source§impl PartialEq for ProjectLanguage
impl PartialEq for ProjectLanguage
impl Copy for ProjectLanguage
impl StructuralPartialEq for ProjectLanguage
Auto Trait Implementations§
impl Freeze for ProjectLanguage
impl RefUnwindSafe for ProjectLanguage
impl Send for ProjectLanguage
impl Sync for ProjectLanguage
impl Unpin for ProjectLanguage
impl UnwindSafe for ProjectLanguage
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