Enum symbolic_common::Language [−][src]
#[repr(u32)] #[non_exhaustive] pub enum Language { Unknown, C, Cpp, D, Go, ObjC, ObjCpp, Rust, Swift, }
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)
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
impl Language
[src]
impl Language
[src]pub fn from_u32(val: u32) -> Language
[src]
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));
pub fn name(self) -> &'static str
[src]
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
impl<'de> Deserialize<'de> for Language
[src]
impl<'de> Deserialize<'de> for Language
[src]fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl FromStr for Language
[src]
impl FromStr for Language
[src]type Err = UnknownLanguageError
The associated error which can be returned from parsing.
fn from_str(string: &str) -> Result<Language, UnknownLanguageError>
[src]
impl PartialOrd<Language> for Language
[src]
impl PartialOrd<Language> for Language
[src]impl StructuralEq for Language
[src]
impl StructuralEq for Language
[src]impl StructuralPartialEq for Language
[src]
impl StructuralPartialEq for Language
[src]Auto Trait Implementations
impl RefUnwindSafe for Language
impl RefUnwindSafe for Language
impl UnwindSafe for Language
impl UnwindSafe for Language