Struct pro_lang_ir::Selector[][src]

pub struct Selector { /* fields omitted */ }

A function selector.

Note

This is equal to the first four bytes of the SHA-3 hash of a function's name.

Implementations

impl Selector[src]

pub fn new(bytes: [u8; 4]) -> Self[src]

Creates a new selector from the given bytes.

pub fn as_bytes(&self) -> &[u8; 4][src]

Returns the underlying four bytes.

pub fn unique_id(self) -> usize[src]

Returns a unique identifier as usize.

Trait Implementations

impl Clone for Selector[src]

impl Copy for Selector[src]

impl Debug for Selector[src]

impl Eq for Selector[src]

impl From<[u8; 4]> for Selector[src]

impl Hash for Selector[src]

impl Ord for Selector[src]

impl PartialEq<Selector> for Selector[src]

impl PartialOrd<Selector> for Selector[src]

impl StructuralEq for Selector[src]

impl StructuralPartialEq for Selector[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> From<T> for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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

type Owned = T

The resulting type after obtaining ownership.

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.