pub trait WebSocketMethods<D>
where D: DomTypes,
{
Show 20 methods // Required methods fn Url(&self) -> DOMString; fn ReadyState(&self) -> u16; fn BufferedAmount(&self) -> u64; fn GetOnopen(&self) -> Option<Rc<EventHandlerNonNull<D>>>; fn SetOnopen(&self, value: Option<Rc<EventHandlerNonNull<D>>>); fn GetOnerror(&self) -> Option<Rc<EventHandlerNonNull<D>>>; fn SetOnerror(&self, value: Option<Rc<EventHandlerNonNull<D>>>); fn GetOnclose(&self) -> Option<Rc<EventHandlerNonNull<D>>>; fn SetOnclose(&self, value: Option<Rc<EventHandlerNonNull<D>>>); fn Protocol(&self) -> DOMString; fn Close( &self, code: Option<u16>, reason: Option<USVString>, ) -> Result<(), Error>; fn GetOnmessage(&self) -> Option<Rc<EventHandlerNonNull<D>>>; fn SetOnmessage(&self, value: Option<Rc<EventHandlerNonNull<D>>>); fn BinaryType(&self) -> BinaryType; fn SetBinaryType(&self, value: BinaryType); fn Send(&self, data: USVString) -> Result<(), Error>; fn Send_(&self, data: &<D as DomTypes>::Blob) -> Result<(), Error>; fn Send__( &self, data: CustomAutoRooterGuard<'_, TypedArray<ArrayBufferU8, *mut JSObject>>, ) -> Result<(), Error>; fn Send___( &self, data: CustomAutoRooterGuard<'_, TypedArray<ArrayBufferViewU8, *mut JSObject>>, ) -> Result<(), Error>; fn Constructor( global: &<D as DomTypes>::GlobalScope, proto: Option<Handle<'_, *mut JSObject>>, can_gc: CanGc, url: DOMString, protocols: Option<StringOrStringSequence>, ) -> Result<Root<Dom<<D as DomTypes>::WebSocket>>, Error>;
}

Required Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§