Enum symbolic_common::Language
source · [−]#[repr(u32)]
#[non_exhaustive]
pub enum Language {
Unknown,
C,
Cpp,
D,
Go,
ObjC,
ObjCpp,
Rust,
Swift,
CSharp,
VisualBasic,
FSharp,
}
Expand description
A programming language declared in debugging information.
In the context of function names or source code, the lanugage can help to determine appropriate
strategies for demangling names or syntax highlighting. See the Name
type, which declares a
function name with an optional language.
This enumeration is represented as u32
for C-bindings and lowlevel APIs.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Unknown
C
Cpp
D
Go
ObjC
ObjCpp
Rust
Swift
CSharp
VisualBasic
FSharp
Implementations
sourceimpl Language
impl Language
sourcepub fn from_u32(val: u32) -> Language
pub fn from_u32(val: u32) -> Language
Creates an Language
from its u32
representation.
Returns Language::Unknown
for all unknown values.
Examples
use symbolic_common::Language;
// Will print "C"
println!("{:?}", Language::from_u32(1));
sourcepub fn name(self) -> &'static str
pub fn name(self) -> &'static str
Returns the name of the language.
The name is always given in lower case without special characters or spaces, suitable for
serialization and parsing. For a human readable name, use the Display
implementation,
instead.
Examples
use symbolic_common::Language;
// Will print "objcpp"
println!("{}", Language::ObjCpp.name());
// Will print "Objective-C++"
println!("{}", Language::ObjCpp);
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Language
impl<'de> Deserialize<'de> for Language
sourcefn 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
sourceimpl FromStr for Language
impl FromStr for Language
type Err = UnknownLanguageError
type Err = UnknownLanguageError
The associated error which can be returned from parsing.
sourceimpl Ord for Language
impl Ord for Language
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<Language> for Language
impl PartialEq<Language> for Language
sourceimpl PartialOrd<Language> for Language
impl PartialOrd<Language> for Language
sourcefn partial_cmp(&self, other: &Language) -> Option<Ordering>
fn partial_cmp(&self, other: &Language) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
impl Copy for Language
impl Eq for Language
impl StructuralEq for Language
impl StructuralPartialEq for Language
Auto Trait Implementations
impl RefUnwindSafe for Language
impl Send for Language
impl Sync for Language
impl Unpin for Language
impl UnwindSafe for Language
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more