Struct rune::runtime::VecTuple

source ·
pub struct VecTuple<T>(pub T);
Expand description

A helper type to deserialize arrays with different interior types.

This implements FromValue, allowing it to be used as a return value from a virtual machine.

Tuple Fields§

§0: T

Implementations§

source§

impl<T> VecTuple<T>
where Self: ToValue,

source

pub fn new(inner: T) -> Self

Construct a new vector tuple for serializing values.

Trait Implementations§

source§

impl<T: Clone> Clone for VecTuple<T>

source§

fn clone(&self) -> VecTuple<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug> Debug for VecTuple<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl FromValue for VecTuple<()>

source§

fn from_value(value: Value) -> VmResult<Self>

Try to convert to the given type, from the given value.
source§

impl<A> FromValue for VecTuple<(A,)>
where A: FromValue,

source§

fn from_value(value: Value) -> VmResult<Self>

Try to convert to the given type, from the given value.
source§

impl<A, B> FromValue for VecTuple<(A, B)>
where A: FromValue, B: FromValue,

source§

fn from_value(value: Value) -> VmResult<Self>

Try to convert to the given type, from the given value.
source§

impl<A, B, C> FromValue for VecTuple<(A, B, C)>
where A: FromValue, B: FromValue, C: FromValue,

source§

fn from_value(value: Value) -> VmResult<Self>

Try to convert to the given type, from the given value.
source§

impl<A, B, C, D> FromValue for VecTuple<(A, B, C, D)>
where A: FromValue, B: FromValue, C: FromValue, D: FromValue,

source§

fn from_value(value: Value) -> VmResult<Self>

Try to convert to the given type, from the given value.
source§

impl<A, B, C, D, E> FromValue for VecTuple<(A, B, C, D, E)>
where A: FromValue, B: FromValue, C: FromValue, D: FromValue, E: FromValue,

source§

fn from_value(value: Value) -> VmResult<Self>

Try to convert to the given type, from the given value.
source§

impl<A, B, C, D, E, F> FromValue for VecTuple<(A, B, C, D, E, F)>

source§

fn from_value(value: Value) -> VmResult<Self>

Try to convert to the given type, from the given value.
source§

impl<A, B, C, D, E, F, G> FromValue for VecTuple<(A, B, C, D, E, F, G)>

source§

fn from_value(value: Value) -> VmResult<Self>

Try to convert to the given type, from the given value.
source§

impl<A, B, C, D, E, F, G, H> FromValue for VecTuple<(A, B, C, D, E, F, G, H)>

source§

fn from_value(value: Value) -> VmResult<Self>

Try to convert to the given type, from the given value.
source§

impl<A, B, C, D, E, F, G, H, I> FromValue for VecTuple<(A, B, C, D, E, F, G, H, I)>

source§

fn from_value(value: Value) -> VmResult<Self>

Try to convert to the given type, from the given value.
source§

impl<A, B, C, D, E, F, G, H, I, J> FromValue for VecTuple<(A, B, C, D, E, F, G, H, I, J)>

source§

fn from_value(value: Value) -> VmResult<Self>

Try to convert to the given type, from the given value.
source§

impl<A, B, C, D, E, F, G, H, I, J, K> FromValue for VecTuple<(A, B, C, D, E, F, G, H, I, J, K)>

source§

fn from_value(value: Value) -> VmResult<Self>

Try to convert to the given type, from the given value.
source§

impl<A, B, C, D, E, F, G, H, I, J, K, L> FromValue for VecTuple<(A, B, C, D, E, F, G, H, I, J, K, L)>

source§

fn from_value(value: Value) -> VmResult<Self>

Try to convert to the given type, from the given value.
source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M> FromValue for VecTuple<(A, B, C, D, E, F, G, H, I, J, K, L, M)>

source§

fn from_value(value: Value) -> VmResult<Self>

Try to convert to the given type, from the given value.
source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N> FromValue for VecTuple<(A, B, C, D, E, F, G, H, I, J, K, L, M, N)>

source§

fn from_value(value: Value) -> VmResult<Self>

Try to convert to the given type, from the given value.
source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O> FromValue for VecTuple<(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)>

source§

fn from_value(value: Value) -> VmResult<Self>

Try to convert to the given type, from the given value.
source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P> FromValue for VecTuple<(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)>

source§

fn from_value(value: Value) -> VmResult<Self>

Try to convert to the given type, from the given value.
source§

impl<T: Hash> Hash for VecTuple<T>

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

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

Feeds a slice of this type into the given Hasher. Read more
source§

impl<T> MaybeTypeOf for VecTuple<T>

source§

fn maybe_type_of() -> Option<FullTypeOf>

Type information for the given type.
source§

impl<T: Ord> Ord for VecTuple<T>

source§

fn cmp(&self, other: &VecTuple<T>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl<T: PartialEq> PartialEq for VecTuple<T>

source§

fn eq(&self, other: &VecTuple<T>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T: PartialOrd> PartialOrd for VecTuple<T>

source§

fn partial_cmp(&self, other: &VecTuple<T>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl ToValue for VecTuple<()>

source§

fn to_value(self) -> VmResult<Value>

Convert into a value.
source§

impl<A> ToValue for VecTuple<(A,)>
where A: ToValue,

source§

fn to_value(self) -> VmResult<Value>

Convert into a value.
source§

impl<A, B> ToValue for VecTuple<(A, B)>
where A: ToValue, B: ToValue,

source§

fn to_value(self) -> VmResult<Value>

Convert into a value.
source§

impl<A, B, C> ToValue for VecTuple<(A, B, C)>
where A: ToValue, B: ToValue, C: ToValue,

source§

fn to_value(self) -> VmResult<Value>

Convert into a value.
source§

impl<A, B, C, D> ToValue for VecTuple<(A, B, C, D)>
where A: ToValue, B: ToValue, C: ToValue, D: ToValue,

source§

fn to_value(self) -> VmResult<Value>

Convert into a value.
source§

impl<A, B, C, D, E> ToValue for VecTuple<(A, B, C, D, E)>
where A: ToValue, B: ToValue, C: ToValue, D: ToValue, E: ToValue,

source§

fn to_value(self) -> VmResult<Value>

Convert into a value.
source§

impl<A, B, C, D, E, F> ToValue for VecTuple<(A, B, C, D, E, F)>
where A: ToValue, B: ToValue, C: ToValue, D: ToValue, E: ToValue, F: ToValue,

source§

fn to_value(self) -> VmResult<Value>

Convert into a value.
source§

impl<A, B, C, D, E, F, G> ToValue for VecTuple<(A, B, C, D, E, F, G)>
where A: ToValue, B: ToValue, C: ToValue, D: ToValue, E: ToValue, F: ToValue, G: ToValue,

source§

fn to_value(self) -> VmResult<Value>

Convert into a value.
source§

impl<A, B, C, D, E, F, G, H> ToValue for VecTuple<(A, B, C, D, E, F, G, H)>
where A: ToValue, B: ToValue, C: ToValue, D: ToValue, E: ToValue, F: ToValue, G: ToValue, H: ToValue,

source§

fn to_value(self) -> VmResult<Value>

Convert into a value.
source§

impl<A, B, C, D, E, F, G, H, I> ToValue for VecTuple<(A, B, C, D, E, F, G, H, I)>
where A: ToValue, B: ToValue, C: ToValue, D: ToValue, E: ToValue, F: ToValue, G: ToValue, H: ToValue, I: ToValue,

source§

fn to_value(self) -> VmResult<Value>

Convert into a value.
source§

impl<A, B, C, D, E, F, G, H, I, J> ToValue for VecTuple<(A, B, C, D, E, F, G, H, I, J)>
where A: ToValue, B: ToValue, C: ToValue, D: ToValue, E: ToValue, F: ToValue, G: ToValue, H: ToValue, I: ToValue, J: ToValue,

source§

fn to_value(self) -> VmResult<Value>

Convert into a value.
source§

impl<A, B, C, D, E, F, G, H, I, J, K> ToValue for VecTuple<(A, B, C, D, E, F, G, H, I, J, K)>
where A: ToValue, B: ToValue, C: ToValue, D: ToValue, E: ToValue, F: ToValue, G: ToValue, H: ToValue, I: ToValue, J: ToValue, K: ToValue,

source§

fn to_value(self) -> VmResult<Value>

Convert into a value.
source§

impl<A, B, C, D, E, F, G, H, I, J, K, L> ToValue for VecTuple<(A, B, C, D, E, F, G, H, I, J, K, L)>
where A: ToValue, B: ToValue, C: ToValue, D: ToValue, E: ToValue, F: ToValue, G: ToValue, H: ToValue, I: ToValue, J: ToValue, K: ToValue, L: ToValue,

source§

fn to_value(self) -> VmResult<Value>

Convert into a value.
source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M> ToValue for VecTuple<(A, B, C, D, E, F, G, H, I, J, K, L, M)>
where A: ToValue, B: ToValue, C: ToValue, D: ToValue, E: ToValue, F: ToValue, G: ToValue, H: ToValue, I: ToValue, J: ToValue, K: ToValue, L: ToValue, M: ToValue,

source§

fn to_value(self) -> VmResult<Value>

Convert into a value.
source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N> ToValue for VecTuple<(A, B, C, D, E, F, G, H, I, J, K, L, M, N)>
where A: ToValue, B: ToValue, C: ToValue, D: ToValue, E: ToValue, F: ToValue, G: ToValue, H: ToValue, I: ToValue, J: ToValue, K: ToValue, L: ToValue, M: ToValue, N: ToValue,

source§

fn to_value(self) -> VmResult<Value>

Convert into a value.
source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O> ToValue for VecTuple<(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)>
where A: ToValue, B: ToValue, C: ToValue, D: ToValue, E: ToValue, F: ToValue, G: ToValue, H: ToValue, I: ToValue, J: ToValue, K: ToValue, L: ToValue, M: ToValue, N: ToValue, O: ToValue,

source§

fn to_value(self) -> VmResult<Value>

Convert into a value.
source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P> ToValue for VecTuple<(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)>
where A: ToValue, B: ToValue, C: ToValue, D: ToValue, E: ToValue, F: ToValue, G: ToValue, H: ToValue, I: ToValue, J: ToValue, K: ToValue, L: ToValue, M: ToValue, N: ToValue, O: ToValue, P: ToValue,

source§

fn to_value(self) -> VmResult<Value>

Convert into a value.
source§

impl<T> TypeOf for VecTuple<T>

source§

fn type_hash() -> Hash

Get full type hash, including type parameters.
source§

fn type_info() -> TypeInfo

Access diagnostical information on the value type.
source§

fn type_of() -> FullTypeOf

Type information for the given type.
source§

fn type_parameters() -> Hash

Hash of type parameters.
source§

impl<T: Copy> Copy for VecTuple<T>

source§

impl<T: Eq> Eq for VecTuple<T>

source§

impl<T> StructuralPartialEq for VecTuple<T>

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for VecTuple<T>
where T: RefUnwindSafe,

§

impl<T> Send for VecTuple<T>
where T: Send,

§

impl<T> Sync for VecTuple<T>
where T: Sync,

§

impl<T> Unpin for VecTuple<T>
where T: Unpin,

§

impl<T> UnwindSafe for VecTuple<T>
where T: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
source§

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

source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

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

source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

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

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

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

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> UnsafeToValue for T
where T: ToValue,

§

type Guard = ()

The type used to guard the unsafe value conversion.
source§

unsafe fn unsafe_to_value( self ) -> VmResult<(Value, <T as UnsafeToValue>::Guard)>

Convert into a value. Read more
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> RuleType for T
where T: Copy + Debug + Eq + Hash + Ord,