pub type Generic<T> = OpaqueValue<RootedThread, T>;
Aliased Type§
struct Generic<T>(/* private fields */);
Implementations§
source§impl<T, V> Opaque<RootedValue<T>, V>where
T: VmRootInternal,
V: ?Sized,
impl<T, V> Opaque<RootedValue<T>, V>where T: VmRootInternal, V: ?Sized,
source§impl<T, V> Opaque<T, V>where
V: ?Sized,
impl<T, V> Opaque<T, V>where V: ?Sized,
pub fn from_value(value: T) -> Self
pub fn into_inner(self) -> T
Trait Implementations§
source§impl<T, V> Ord for Opaque<T, V>where
T: AsValueRef,
Self: Borrow<V>,
V: ?Sized + Ord,
impl<T, V> Ord for Opaque<T, V>where T: AsValueRef, Self: Borrow<V>, V: ?Sized + Ord,
source§impl<T, V> PartialEq<Opaque<T, V>> for Opaque<T, V>where
T: AsValueRef,
Self: Borrow<V>,
V: ?Sized + PartialEq,
impl<T, V> PartialEq<Opaque<T, V>> for Opaque<T, V>where T: AsValueRef, Self: Borrow<V>, V: ?Sized + PartialEq,
source§impl<T, V> PartialOrd<Opaque<T, V>> for Opaque<T, V>where
T: AsValueRef,
Self: Borrow<V>,
V: ?Sized + PartialOrd,
impl<T, V> PartialOrd<Opaque<T, V>> for Opaque<T, V>where T: AsValueRef, Self: Borrow<V>, V: ?Sized + PartialOrd,
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
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 moresource§impl<'s, 'value, 'vm, T, V> Pushable<'vm> for Opaque<T, V>where
T: Pushable<'vm>,
V: ?Sized,
impl<'s, 'value, 'vm, T, V> Pushable<'vm> for Opaque<T, V>where T: Pushable<'vm>, V: ?Sized,
source§fn vm_push(self, context: &mut ActiveThread<'vm>) -> Result<()>
fn vm_push(self, context: &mut ActiveThread<'vm>) -> Result<()>
Pushes
self
to stack
. If the call is successful a single element should have been added
to the stack and Ok(())
should be returned. If the call is unsuccessful Status:Error
should be returned and the stack should be left intactfn status_push(self, context: &mut ActiveThread<'vm>) -> Statuswhere Self: Sized,
unsafe fn marshal_unrooted(self, vm: &'vm Thread) -> Result<Value>where Self: Sized,
fn marshal<T>(self, vm: &'vm Thread) -> Result<RootedValue<T>>where Self: Sized, T: VmRoot<'vm>,
source§impl<T> SerializeState<Thread> for Opaque<T, str>where
T: AsValueRef,
impl<T> SerializeState<Thread> for Opaque<T, str>where T: AsValueRef,
source§fn serialize_state<S>(
&self,
serializer: S,
_thread: &Thread
) -> StdResult<S::Ok, S::Error>where
S: Serializer,
fn serialize_state<S>( &self, serializer: S, _thread: &Thread ) -> StdResult<S::Ok, S::Error>where S: Serializer,
Serializes
self
source§impl<T, V> VmType for Opaque<T, V>where
V: ?Sized + VmType,
V::Type: Sized,
impl<T, V> VmType for Opaque<T, V>where V: ?Sized + VmType, V::Type: Sized,
§type Type = <V as VmType>::Type
type Type = <V as VmType>::Type
A version of
Self
which implements Any
allowing a TypeId
to be retrievedsource§const EXTRA_ARGS: VmIndex = V::EXTRA_ARGS
const EXTRA_ARGS: VmIndex = V::EXTRA_ARGS
How many extra arguments a function returning this type requires.
Used for abstract types which when used in return position should act like they still need
more arguments before they are called