[−][src]Struct gluon_vm::api::Opaque
Type implementing both Pushable
and Getable
of values of V
regardless of wheter V
implements the traits.
The actual value, V
is only accessible directly either by Deref
if it is Userdata
or a
string or by the to_value
method if it implements Getable
.
When the value is not accessible the value can only be transferred back into gluon again without inspecting the value itself two different threads.
Methods
impl<T, V> Opaque<T, V> where
V: ?Sized,
[src]
V: ?Sized,
pub fn from_value(value: T) -> Self
[src]
pub fn into_inner(self) -> T
[src]
impl<'s, 'value, T, V> Opaque<T, V> where
T: AsVariant<'s, 'value>,
V: ?Sized,
[src]
T: AsVariant<'s, 'value>,
V: ?Sized,
pub unsafe fn get_value(&'s self) -> Value
[src]
Unsafe as Value
are not rooted
pub fn get_variant(&'s self) -> Variants<'value>
[src]
pub fn get_ref(&'s self) -> ValueRef<'value>
[src]
impl<'s, 'value, T, V> Opaque<T, [V]> where
T: AsVariant<'s, 'value>,
[src]
T: AsVariant<'s, 'value>,
pub fn len(&'s self) -> usize
[src]
pub fn get(&'s self, index: VmInt) -> Option<OpaqueRef<'value, V>>
[src]
pub fn iter(&'s self) -> Iter<'s, 'value, T, V>
[src]
Trait Implementations
impl<T, V: ?Sized> VmType for Opaque<T, V> where
V: VmType,
V::Type: Sized,
[src]
V: VmType,
V::Type: Sized,
type Type = V::Type
A version of Self
which implements Any
allowing a TypeId
to be retrieved
fn make_type(vm: &Thread) -> ArcType
[src]
fn extra_args() -> VmIndex
[src]
fn make_forall_type(vm: &Thread) -> ArcType
[src]
impl<'s, 'value, 'vm, T, V: ?Sized> Pushable<'vm> for Opaque<T, V> where
T: Pushable<'vm>,
V: VmType,
V::Type: Sized,
[src]
T: Pushable<'vm>,
V: VmType,
V::Type: Sized,
fn push(self, context: &mut ActiveThread<'vm>) -> Result<()>
[src]
fn status_push(self, context: &mut ActiveThread<'vm>) -> Status where
Self: Sized,
[src]
Self: Sized,
unsafe fn marshal_unrooted(self, vm: &'vm Thread) -> Result<Value> where
Self: Sized,
[src]
Self: Sized,
fn marshal<T>(self, vm: &'vm Thread) -> Result<RootedValue<T>> where
Self: Sized,
T: VmRoot<'vm>,
[src]
Self: Sized,
T: VmRoot<'vm>,
impl<'vm, 'value, V> Getable<'vm, 'value> for Opaque<Variants<'value>, V> where
V: ?Sized,
[src]
V: ?Sized,
fn from_value(_vm: &'vm Thread, value: Variants<'value>) -> Self
[src]
impl<T, V: ?Sized> PartialOrd<Opaque<T, V>> for Opaque<T, V> where
T: AsValueRef,
Self: Borrow<V>,
V: PartialOrd,
[src]
T: AsValueRef,
Self: Borrow<V>,
V: PartialOrd,
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<T, V: ?Sized> PartialEq<Opaque<T, V>> for Opaque<T, V> where
T: AsValueRef,
Self: Borrow<V>,
V: PartialEq,
[src]
T: AsValueRef,
Self: Borrow<V>,
V: PartialEq,
fn eq(&self, other: &Self) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl<T, V> AsRef<V> for Opaque<T, V> where
V: ?Sized,
Self: Deref<Target = V>,
[src]
V: ?Sized,
Self: Deref<Target = V>,
impl<'a, T, V> IntoIterator for &'a Opaque<T, [V]> where
T: AsVariant<'a, 'a>,
[src]
T: AsVariant<'a, 'a>,
type Item = OpaqueRef<'a, V>
The type of the elements being iterated over.
type IntoIter = Iter<'a, 'a, T, V>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
impl<T, V> Clone for Opaque<T, V> where
T: Clone,
[src]
T: Clone,
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T, V: ?Sized> Ord for Opaque<T, V> where
T: AsValueRef,
Self: Borrow<V>,
V: Ord,
[src]
T: AsValueRef,
Self: Borrow<V>,
V: Ord,
fn cmp(&self, other: &Self) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
fn clamp(self, min: Self, max: Self) -> Self
[src]
clamp
)Returns max if self is greater than max, and min if self is less than min. Otherwise this will return self. Panics if min > max. Read more
impl<T, V: ?Sized> Eq for Opaque<T, V> where
T: AsValueRef,
Self: Borrow<V>,
V: Eq,
[src]
T: AsValueRef,
Self: Borrow<V>,
V: Eq,
impl<T, V> Debug for Opaque<T, V> where
T: Debug,
[src]
T: Debug,
impl<T, V> Deref for Opaque<T, V> where
T: AsValueRef,
V: Userdata,
[src]
T: AsValueRef,
V: Userdata,
impl<T, V> Deref for Opaque<T, [V]> where
T: AsValueRef,
V: ArrayRepr + Copy,
[src]
T: AsValueRef,
V: ArrayRepr + Copy,
impl<T> Deref for Opaque<T, str> where
T: AsValueRef,
[src]
T: AsValueRef,
impl<T, V> Borrow<V> for Opaque<T, V> where
V: ?Sized,
Self: Deref<Target = V>,
[src]
V: ?Sized,
Self: Deref<Target = V>,
Auto Trait Implementations
impl<T, V: ?Sized> Send for Opaque<T, V> where
T: Send,
V: Send,
T: Send,
V: Send,
impl<T, V: ?Sized> Sync for Opaque<T, V> where
T: Sync,
V: Sync,
T: Sync,
V: Sync,
Blanket Implementations
impl<'vm, T> AsyncPushable for T where
T: Pushable<'vm>,
[src]
T: Pushable<'vm>,
fn async_push(Self, &mut ActiveThread<'vm>, u32) -> Result<Async<()>, Error>
[src]
fn async_status_push(
self,
context: &mut ActiveThread<'vm>,
frame_index: VmIndex
) -> Status where
Self: Sized,
[src]
self,
context: &mut ActiveThread<'vm>,
frame_index: VmIndex
) -> Status where
Self: Sized,
impl<'vm, T> Pushable for T where
T: Userdata,
[src]
T: Userdata,
fn push(Self, &mut ActiveThread<'vm>) -> Result<(), Error>
[src]
fn status_push(self, context: &mut ActiveThread<'vm>) -> Status where
Self: Sized,
[src]
Self: Sized,
unsafe fn marshal_unrooted(self, vm: &'vm Thread) -> Result<Value> where
Self: Sized,
[src]
Self: Sized,
fn marshal<T>(self, vm: &'vm Thread) -> Result<RootedValue<T>> where
Self: Sized,
T: VmRoot<'vm>,
[src]
Self: Sized,
T: VmRoot<'vm>,
impl<D, T> FromPtr for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<Choices> CoproductSubsetter for Choices
[src]
type Remainder = Choices
fn subset(
self
) -> Result<CNil, <Choices as CoproductSubsetter<CNil, HNil>>::Remainder>
[src]
self
) -> Result<CNil, <Choices as CoproductSubsetter<CNil, HNil>>::Remainder>
impl<Source> Sculptor for Source
[src]
impl<T, U, I> LiftInto for T where
U: LiftFrom<T, I>,
[src]
U: LiftFrom<T, I>,
impl<T> Any for T where
T: Any,
[src]
T: Any,