Trait runestick::GuardedArgs[][src]

pub trait GuardedArgs {
    type Guard;
    unsafe fn unsafe_into_stack(
        self,
        stack: &mut Stack
    ) -> Result<Self::Guard, VmError>;
fn count(&self) -> usize; }

Trait for converting arguments onto the stack.

This can take references, because it is unsafe to call. And should only be implemented in contexts where it can be guaranteed that the references will not outlive the call.

Associated Types

type Guard[src]

Guard that when dropped will invalidate any values encoded.

Loading content...

Required methods

unsafe fn unsafe_into_stack(
    self,
    stack: &mut Stack
) -> Result<Self::Guard, VmError>
[src]

Encode arguments onto a stack.

Safety

This is implemented for and allows encoding references on the stack. The returned guard must be dropped before any used references are invalidated.

fn count(&self) -> usize[src]

The number of arguments.

Loading content...

Implementations on Foreign Types

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P> GuardedArgs for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) where
    A: UnsafeToValue,
    B: UnsafeToValue,
    C: UnsafeToValue,
    D: UnsafeToValue,
    E: UnsafeToValue,
    F: UnsafeToValue,
    G: UnsafeToValue,
    H: UnsafeToValue,
    I: UnsafeToValue,
    J: UnsafeToValue,
    K: UnsafeToValue,
    L: UnsafeToValue,
    M: UnsafeToValue,
    N: UnsafeToValue,
    O: UnsafeToValue,
    P: UnsafeToValue
[src]

type Guard = (A::Guard, B::Guard, C::Guard, D::Guard, E::Guard, F::Guard, G::Guard, H::Guard, I::Guard, J::Guard, K::Guard, L::Guard, M::Guard, N::Guard, O::Guard, P::Guard)

impl<B, C, D, E, F, G, H, I, J, K, L, M, N, O, P> GuardedArgs for (B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) where
    B: UnsafeToValue,
    C: UnsafeToValue,
    D: UnsafeToValue,
    E: UnsafeToValue,
    F: UnsafeToValue,
    G: UnsafeToValue,
    H: UnsafeToValue,
    I: UnsafeToValue,
    J: UnsafeToValue,
    K: UnsafeToValue,
    L: UnsafeToValue,
    M: UnsafeToValue,
    N: UnsafeToValue,
    O: UnsafeToValue,
    P: UnsafeToValue
[src]

type Guard = (B::Guard, C::Guard, D::Guard, E::Guard, F::Guard, G::Guard, H::Guard, I::Guard, J::Guard, K::Guard, L::Guard, M::Guard, N::Guard, O::Guard, P::Guard)

impl<C, D, E, F, G, H, I, J, K, L, M, N, O, P> GuardedArgs for (C, D, E, F, G, H, I, J, K, L, M, N, O, P) where
    C: UnsafeToValue,
    D: UnsafeToValue,
    E: UnsafeToValue,
    F: UnsafeToValue,
    G: UnsafeToValue,
    H: UnsafeToValue,
    I: UnsafeToValue,
    J: UnsafeToValue,
    K: UnsafeToValue,
    L: UnsafeToValue,
    M: UnsafeToValue,
    N: UnsafeToValue,
    O: UnsafeToValue,
    P: UnsafeToValue
[src]

type Guard = (C::Guard, D::Guard, E::Guard, F::Guard, G::Guard, H::Guard, I::Guard, J::Guard, K::Guard, L::Guard, M::Guard, N::Guard, O::Guard, P::Guard)

impl<D, E, F, G, H, I, J, K, L, M, N, O, P> GuardedArgs for (D, E, F, G, H, I, J, K, L, M, N, O, P) where
    D: UnsafeToValue,
    E: UnsafeToValue,
    F: UnsafeToValue,
    G: UnsafeToValue,
    H: UnsafeToValue,
    I: UnsafeToValue,
    J: UnsafeToValue,
    K: UnsafeToValue,
    L: UnsafeToValue,
    M: UnsafeToValue,
    N: UnsafeToValue,
    O: UnsafeToValue,
    P: UnsafeToValue
[src]

type Guard = (D::Guard, E::Guard, F::Guard, G::Guard, H::Guard, I::Guard, J::Guard, K::Guard, L::Guard, M::Guard, N::Guard, O::Guard, P::Guard)

impl<E, F, G, H, I, J, K, L, M, N, O, P> GuardedArgs for (E, F, G, H, I, J, K, L, M, N, O, P) where
    E: UnsafeToValue,
    F: UnsafeToValue,
    G: UnsafeToValue,
    H: UnsafeToValue,
    I: UnsafeToValue,
    J: UnsafeToValue,
    K: UnsafeToValue,
    L: UnsafeToValue,
    M: UnsafeToValue,
    N: UnsafeToValue,
    O: UnsafeToValue,
    P: UnsafeToValue
[src]

type Guard = (E::Guard, F::Guard, G::Guard, H::Guard, I::Guard, J::Guard, K::Guard, L::Guard, M::Guard, N::Guard, O::Guard, P::Guard)

impl<F, G, H, I, J, K, L, M, N, O, P> GuardedArgs for (F, G, H, I, J, K, L, M, N, O, P) where
    F: UnsafeToValue,
    G: UnsafeToValue,
    H: UnsafeToValue,
    I: UnsafeToValue,
    J: UnsafeToValue,
    K: UnsafeToValue,
    L: UnsafeToValue,
    M: UnsafeToValue,
    N: UnsafeToValue,
    O: UnsafeToValue,
    P: UnsafeToValue
[src]

type Guard = (F::Guard, G::Guard, H::Guard, I::Guard, J::Guard, K::Guard, L::Guard, M::Guard, N::Guard, O::Guard, P::Guard)

impl<G, H, I, J, K, L, M, N, O, P> GuardedArgs for (G, H, I, J, K, L, M, N, O, P) where
    G: UnsafeToValue,
    H: UnsafeToValue,
    I: UnsafeToValue,
    J: UnsafeToValue,
    K: UnsafeToValue,
    L: UnsafeToValue,
    M: UnsafeToValue,
    N: UnsafeToValue,
    O: UnsafeToValue,
    P: UnsafeToValue
[src]

type Guard = (G::Guard, H::Guard, I::Guard, J::Guard, K::Guard, L::Guard, M::Guard, N::Guard, O::Guard, P::Guard)

impl<H, I, J, K, L, M, N, O, P> GuardedArgs for (H, I, J, K, L, M, N, O, P) where
    H: UnsafeToValue,
    I: UnsafeToValue,
    J: UnsafeToValue,
    K: UnsafeToValue,
    L: UnsafeToValue,
    M: UnsafeToValue,
    N: UnsafeToValue,
    O: UnsafeToValue,
    P: UnsafeToValue
[src]

type Guard = (H::Guard, I::Guard, J::Guard, K::Guard, L::Guard, M::Guard, N::Guard, O::Guard, P::Guard)

impl<I, J, K, L, M, N, O, P> GuardedArgs for (I, J, K, L, M, N, O, P) where
    I: UnsafeToValue,
    J: UnsafeToValue,
    K: UnsafeToValue,
    L: UnsafeToValue,
    M: UnsafeToValue,
    N: UnsafeToValue,
    O: UnsafeToValue,
    P: UnsafeToValue
[src]

type Guard = (I::Guard, J::Guard, K::Guard, L::Guard, M::Guard, N::Guard, O::Guard, P::Guard)

impl<J, K, L, M, N, O, P> GuardedArgs for (J, K, L, M, N, O, P) where
    J: UnsafeToValue,
    K: UnsafeToValue,
    L: UnsafeToValue,
    M: UnsafeToValue,
    N: UnsafeToValue,
    O: UnsafeToValue,
    P: UnsafeToValue
[src]

type Guard = (J::Guard, K::Guard, L::Guard, M::Guard, N::Guard, O::Guard, P::Guard)

impl<K, L, M, N, O, P> GuardedArgs for (K, L, M, N, O, P) where
    K: UnsafeToValue,
    L: UnsafeToValue,
    M: UnsafeToValue,
    N: UnsafeToValue,
    O: UnsafeToValue,
    P: UnsafeToValue
[src]

type Guard = (K::Guard, L::Guard, M::Guard, N::Guard, O::Guard, P::Guard)

impl<L, M, N, O, P> GuardedArgs for (L, M, N, O, P) where
    L: UnsafeToValue,
    M: UnsafeToValue,
    N: UnsafeToValue,
    O: UnsafeToValue,
    P: UnsafeToValue
[src]

type Guard = (L::Guard, M::Guard, N::Guard, O::Guard, P::Guard)

impl<M, N, O, P> GuardedArgs for (M, N, O, P) where
    M: UnsafeToValue,
    N: UnsafeToValue,
    O: UnsafeToValue,
    P: UnsafeToValue
[src]

type Guard = (M::Guard, N::Guard, O::Guard, P::Guard)

impl<N, O, P> GuardedArgs for (N, O, P) where
    N: UnsafeToValue,
    O: UnsafeToValue,
    P: UnsafeToValue
[src]

type Guard = (N::Guard, O::Guard, P::Guard)

impl<O, P> GuardedArgs for (O, P) where
    O: UnsafeToValue,
    P: UnsafeToValue
[src]

type Guard = (O::Guard, P::Guard)

impl<P> GuardedArgs for (P,) where
    P: UnsafeToValue
[src]

type Guard = (P::Guard,)

impl GuardedArgs for ()[src]

type Guard = ()

Loading content...

Implementors

Loading content...