Skip to main content

RustCall

Enum RustCall 

Source
pub enum RustCall {
    Op(OpCall),
    Task(TaskStart),
    Method(NodeId, MethodCall),
    Post(ParkedPost),
}
Expand description

What a call JS made into Rust does, carried by an op.

Variants§

§

Op(OpCall)

A module function with a context.

§

Task(TaskStart)

The start of an async function’s or member’s task.

§

Method(NodeId, MethodCall)

A method of the ref of the component on node 0.

§

Post(ParkedPost)

The place of a JS call posted during a synchronous call from JS (Posts::park): applied (dropped), the call runs after what the ops before it post.

Auto Trait Implementations§

§

impl !RefUnwindSafe for RustCall

§

impl !Send for RustCall

§

impl !Sync for RustCall

§

impl !UnwindSafe for RustCall

§

impl Forget for RustCall

§

impl Freeze for RustCall
where *const dyn FnOnce(&mut ModuleCx) -> Result<Box<dyn ToJs>, Thrown> is !null: Freeze, PhantomData<dyn FnOnce(&mut ModuleCx) -> Result<Box<dyn ToJs>, Thrown>>: Freeze, *const dyn FnOnce() -> Pin<Box<dyn Future<Output = Result<Box<dyn ToJs>, Thrown>>>> is !null: Freeze, PhantomData<dyn FnOnce() -> Pin<Box<dyn Future<Output = Result<Box<dyn ToJs>, Thrown>>>>>: Freeze, *const dyn FnOnce(&(dyn Any + 'static)) -> Option<Result<Box<dyn ToJs>, Thrown>> is !null: Freeze, PhantomData<dyn FnOnce(&(dyn Any + 'static)) -> Option<Result<Box<dyn ToJs>, Thrown>>>: Freeze, *const RcInner<PostsInner> is !null: Freeze, PhantomData<RcInner<PostsInner>>: Freeze,

§

impl Move for RustCall

§

impl Unpin for RustCall
where Box<dyn FnOnce(&mut ModuleCx) -> Result<Box<dyn ToJs>, Thrown>>: Unpin, Box<dyn FnOnce() -> Pin<Box<dyn Future<Output = Result<Box<dyn ToJs>, Thrown>>>>>: Unpin, Box<dyn FnOnce(&(dyn Any + 'static)) -> Option<Result<Box<dyn ToJs>, Thrown>>>: Unpin, Rc<PostsInner>: Unpin,

§

impl UnsafeUnpin for RustCall
where *const dyn FnOnce(&mut ModuleCx) -> Result<Box<dyn ToJs>, Thrown> is !null: UnsafeUnpin, PhantomData<dyn FnOnce(&mut ModuleCx) -> Result<Box<dyn ToJs>, Thrown>>: UnsafeUnpin, *const dyn FnOnce() -> Pin<Box<dyn Future<Output = Result<Box<dyn ToJs>, Thrown>>>> is !null: UnsafeUnpin, PhantomData<dyn FnOnce() -> Pin<Box<dyn Future<Output = Result<Box<dyn ToJs>, Thrown>>>>>: UnsafeUnpin, *const dyn FnOnce(&(dyn Any + 'static)) -> Option<Result<Box<dyn ToJs>, Thrown>> is !null: UnsafeUnpin, PhantomData<dyn FnOnce(&(dyn Any + 'static)) -> Option<Result<Box<dyn ToJs>, Thrown>>>: UnsafeUnpin, *const RcInner<PostsInner> is !null: UnsafeUnpin, PhantomData<RcInner<PostsInner>>: UnsafeUnpin,

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<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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.