Struct coffer::dynamic::Dynamic[][src]

pub struct Dynamic {
    pub name: Cow<'static, str>,
    pub descriptor: Type,
    // some fields omitted
}

A dynamic computed constant.

Note: dynamic computed constants are syntactically allowed to refer to themselves via the bootstrap method table but it will fail during resolution. Rust ownership rules prevent us from doing so.

Fields

name: Cow<'static, str>

The name of the bootstrap method that will compute the constant value.

descriptor: Type

The descriptor of the dynamically computed value. Must be a field descriptor.

Implementations

impl Dynamic[src]

pub fn new<N: Into<Cow<'static, str>>, D: Into<Type>>(
    bsm: BootstrapMethod,
    name: N,
    descriptor: D
) -> Dynamic
[src]

Creates a new dynamic computed constant.

pub fn bsm(&self) -> &BootstrapMethod[src]

Returns an immutable reference to the bootstrap method of this dynamic computed constant.

pub fn bsm_mut(&mut self) -> &mut BootstrapMethod[src]

Returns a mutable reference to the bootstrap method of this dynamic computed constant.

pub fn into_inner(self) -> (Option<BootstrapMethod>, Cow<'static, str>, Type)[src]

Trait Implementations

impl Clone for Dynamic[src]

impl Debug for Dynamic[src]

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

impl Hash for Dynamic[src]

impl PartialEq<Dynamic> for Dynamic[src]

impl StructuralPartialEq for Dynamic[src]

Auto Trait Implementations

impl !RefUnwindSafe for Dynamic

impl !Send for Dynamic

impl !Sync for Dynamic

impl Unpin for Dynamic

impl !UnwindSafe for Dynamic

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> Conv for T

impl<T> Conv for T

impl<T> FmtForward for T

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

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

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

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryConv for T

impl<T> TryConv for T

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.