[][src]Enum symbolic_common::Language

#[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.
Unknown
C
Cpp
D
Go
ObjC
ObjCpp
Rust
Swift

Implementations

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 Clone for Language[src]

impl Copy for Language[src]

impl Debug for Language[src]

impl Default for Language[src]

impl<'de> Deserialize<'de> for Language[src]

impl Display for Language[src]

impl Eq for Language[src]

impl FromStr for Language[src]

type Err = UnknownLanguageError

The associated error which can be returned from parsing.

impl Hash for Language[src]

impl Ord for Language[src]

impl PartialEq<Language> for Language[src]

impl PartialOrd<Language> for Language[src]

impl Serialize for Language[src]

impl StructuralEq for Language[src]

impl StructuralPartialEq for Language[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.