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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Implementations§
source§impl 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§
source§impl<'de> Deserialize<'de> for Language
impl<'de> Deserialize<'de> for Language
source§fn 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
source§impl Ord for Language
impl Ord for Language
source§impl PartialOrd<Language> for Language
impl PartialOrd<Language> for Language
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 more