#[non_exhaustive]#[repr(u32)]pub enum Language {
Unknown = 0,
C = 1,
Cpp = 2,
D = 3,
Go = 4,
ObjC = 5,
ObjCpp = 6,
Rust = 7,
Swift = 8,
CSharp = 9,
VisualBasic = 10,
FSharp = 11,
}
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.
Unknown = 0
C = 1
Cpp = 2
D = 3
Go = 4
ObjC = 5
ObjCpp = 6
Rust = 7
Swift = 8
CSharp = 9
VisualBasic = 10
FSharp = 11
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 for Language
impl PartialOrd for Language
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 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