pub struct PushAsRef<T, R: ?Sized>(_, _);
Expand description
Newtype which can be used to push types implementating AsRef
Implementations
Trait Implementations
sourceimpl<'vm, T, R: ?Sized> Pushable<'vm> for PushAsRef<T, R>where
T: AsRef<R>,
for<'a> &'a R: Pushable<'vm>,
impl<'vm, T, R: ?Sized> Pushable<'vm> for PushAsRef<T, R>where
T: AsRef<R>,
for<'a> &'a R: Pushable<'vm>,
sourcefn push(self, context: &mut ActiveThread<'vm>) -> Result<()>
fn 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 intact Read morefn 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>,
sourceimpl<T, R: ?Sized> VmType for PushAsRef<T, R>where
T: AsRef<R>,
R: 'static,
&'static R: VmType,
impl<T, R: ?Sized> VmType for PushAsRef<T, R>where
T: AsRef<R>,
R: 'static,
&'static R: VmType,
type Type = <&'static R as VmType>::Type
type Type = <&'static R as VmType>::Type
A version of
Self
which implements Any
allowing a TypeId
to be retrievedfn make_forall_type(vm: &Thread) -> ArcType
sourcefn extra_args() -> VmIndex
fn extra_args() -> VmIndex
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 Read more
Auto Trait Implementations
impl<T, R: ?Sized> RefUnwindSafe for PushAsRef<T, R>where
R: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, R: ?Sized> Send for PushAsRef<T, R>where
R: Send,
T: Send,
impl<T, R: ?Sized> Sync for PushAsRef<T, R>where
R: Sync,
T: Sync,
impl<T, R: ?Sized> Unpin for PushAsRef<T, R>where
R: Unpin,
T: Unpin,
impl<T, R: ?Sized> UnwindSafe for PushAsRef<T, R>where
R: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
sourceimpl<'vm, T> AsyncPushable<'vm> for Twhere
T: Pushable<'vm>,
impl<'vm, T> AsyncPushable<'vm> for Twhere
T: Pushable<'vm>,
sourcefn async_push(
self,
context: &mut ActiveThread<'vm>,
_: u32
) -> Result<Async<()>, Error>
fn async_push(
self,
context: &mut ActiveThread<'vm>,
_: u32
) -> Result<Async<()>, Error>
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 intact. Read morefn async_status_push(
self,
context: &mut ActiveThread<'vm>,
frame_index: VmIndex
) -> Statuswhere
Self: Sized,
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more