[][src]Struct gf::pivot::constant::Constant

pub struct Constant<'a> { /* fields omitted */ }

🟢 Constant in a sealed module.


impl<'a> Constant<'a>[src]

pub unsafe fn from_unsealed(
    module: &'a Module,
    id: ConstantId,
    unsealed: &'a UnsealedConstant
) -> Self

Wrap an unsealed constant.

pub fn module(&self) -> &'a Module[src]

Return parent module.

pub fn id(&self) -> ConstantId[src]

Return ID.

pub fn as_unsealed(&self) -> &'a UnsealedConstant[src]

Return the unsealed constant.

pub fn metadata(&self) -> Metadata<'a>[src]

Return metadata.

pub fn value(&self) -> &'a BitVec[src]

Return value.

pub fn value_str(&self) -> Result<&'a str, Utf8Error>[src]

Return value as a UTF-8 string.

Trait Implementations

impl<'a> Clone for Constant<'a>[src]

impl<'a> Copy for Constant<'a>[src]

impl<'a> Eq for Constant<'a>[src]

impl<'a> Hash for Constant<'a>[src]

impl<'a> PartialEq<Constant<'a>> for Constant<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Constant<'a>

impl<'a> Send for Constant<'a>

impl<'a> Sync for Constant<'a>

impl<'a> Unpin for Constant<'a>

impl<'a> UnwindSafe for Constant<'a>

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized

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

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

The type returned in the event of a conversion error.