[][src]Struct symbolic_common::CodeId

pub struct CodeId { /* fields omitted */ }

Unique platform-dependent identifier of code files.

This identifier assumes a string representation that depends on the platform and compiler used. There are the following known formats:

  • MachO UUID: The unique identifier of a Mach binary, specified in the LC_UUID load command header.
  • GNU Build ID: Contents of the .gnu.build-id note or section contents formatted as lowercase hex string.
  • PE Timestamp: Timestamp and size of image values from a Windows PE header.
  • GO Build ID: Nested GO build identifiers comprising actionID/[.../]contentID.

Methods

impl CodeId[src]

pub fn nil() -> CodeId[src]

Constructs an empty code identifier.

pub fn from_vec(vec: Vec<u8>) -> CodeId[src]

Constructs a CodeId from a binary buffer.

pub fn from_slice(slice: &[u8]) -> CodeId[src]

Constructs a CodeId from a binary slice.

pub fn parse_hex(string: &str) -> Result<CodeId, ParseCodeIdError>[src]

Parses a CodeId from a hexadecimal string.

pub fn is_nil(&self) -> bool[src]

Returns whether this identifier is nil, i.e. it is empty.

pub fn as_slice(&self) -> &[u8][src]

Returns the binary representation of this code identifier.

pub fn uuid(&self) -> Option<Uuid>[src]

If this DebugId holds a UUID, return it.

Trait Implementations

impl Eq for CodeId[src]

impl PartialEq<CodeId> for CodeId[src]

impl Default for CodeId[src]

impl Display for CodeId[src]

impl FromStr for CodeId[src]

type Err = ParseCodeIdError

The associated error which can be returned from parsing.

impl Hash for CodeId[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Clone for CodeId[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialOrd<CodeId> for CodeId[src]

impl From<Vec<u8>> for CodeId[src]

impl<'_> From<&'_ [u8]> for CodeId[src]

impl Ord for CodeId[src]

fn max(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Returns max if self is greater than max, and min if self is less than min. Otherwise this will return self. Panics if min > max. Read more

impl Debug for CodeId[src]

Auto Trait Implementations

impl Send for CodeId

impl Sync for CodeId

Blanket Implementations

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

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

type Owned = T

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

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

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

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

The type returned in the event of a conversion error.