Struct deno_web::MessagePort
source · pub struct MessagePort { /* private fields */ }
Implementations§
source§impl MessagePort
impl MessagePort
pub fn send( &self, state: &mut OpState, data: JsMessageData ) -> Result<(), AnyError>
pub async fn recv( &self, state: Rc<RefCell<OpState>> ) -> Result<Option<JsMessageData>, AnyError>
sourcepub fn disentangle(&self)
pub fn disentangle(&self)
This forcefully disconnects the message port from its paired port. This
will wake up the .recv
on the paired port, which will return Ok(None)
.
Auto Trait Implementations§
impl !RefUnwindSafe for MessagePort
impl Send for MessagePort
impl !Sync for MessagePort
impl Unpin for MessagePort
impl !UnwindSafe for MessagePort
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more