pub trait RTCDataChannelMethods<D>where
D: DomTypes,{
Show 27 methods
// Required methods
fn Label(&self) -> USVString;
fn Ordered(&self) -> bool;
fn GetMaxPacketLifeTime(&self) -> Option<u16>;
fn GetMaxRetransmits(&self) -> Option<u16>;
fn Protocol(&self) -> USVString;
fn Negotiated(&self) -> bool;
fn GetId(&self) -> Option<u16>;
fn ReadyState(&self) -> RTCDataChannelState;
fn GetOnopen(
&self,
cx: &mut JSContext,
) -> Option<RootedCallback<EventHandlerNonNull<D>>>;
fn SetOnopen(
&self,
cx: &mut JSContext,
value: Option<RootedCallback<EventHandlerNonNull<D>>>,
);
fn GetOnbufferedamountlow(
&self,
cx: &mut JSContext,
) -> Option<RootedCallback<EventHandlerNonNull<D>>>;
fn SetOnbufferedamountlow(
&self,
cx: &mut JSContext,
value: Option<RootedCallback<EventHandlerNonNull<D>>>,
);
fn GetOnerror(
&self,
cx: &mut JSContext,
) -> Option<RootedCallback<EventHandlerNonNull<D>>>;
fn SetOnerror(
&self,
cx: &mut JSContext,
value: Option<RootedCallback<EventHandlerNonNull<D>>>,
);
fn GetOnclosing(
&self,
cx: &mut JSContext,
) -> Option<RootedCallback<EventHandlerNonNull<D>>>;
fn SetOnclosing(
&self,
cx: &mut JSContext,
value: Option<RootedCallback<EventHandlerNonNull<D>>>,
);
fn GetOnclose(
&self,
cx: &mut JSContext,
) -> Option<RootedCallback<EventHandlerNonNull<D>>>;
fn SetOnclose(
&self,
cx: &mut JSContext,
value: Option<RootedCallback<EventHandlerNonNull<D>>>,
);
fn Close(&self);
fn GetOnmessage(
&self,
cx: &mut JSContext,
) -> Option<RootedCallback<EventHandlerNonNull<D>>>;
fn SetOnmessage(
&self,
cx: &mut JSContext,
value: Option<RootedCallback<EventHandlerNonNull<D>>>,
);
fn BinaryType(&self) -> DOMString;
fn SetBinaryType(&self, value: DOMString) -> Result<(), Error>;
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>;
}Required Methods§
fn Label(&self) -> USVString
fn Ordered(&self) -> bool
fn GetMaxPacketLifeTime(&self) -> Option<u16>
fn GetMaxRetransmits(&self) -> Option<u16>
fn Protocol(&self) -> USVString
fn Negotiated(&self) -> bool
fn GetId(&self) -> Option<u16>
fn ReadyState(&self) -> RTCDataChannelState
fn GetOnopen( &self, cx: &mut JSContext, ) -> Option<RootedCallback<EventHandlerNonNull<D>>>
fn SetOnopen( &self, cx: &mut JSContext, value: Option<RootedCallback<EventHandlerNonNull<D>>>, )
fn GetOnbufferedamountlow( &self, cx: &mut JSContext, ) -> Option<RootedCallback<EventHandlerNonNull<D>>>
fn SetOnbufferedamountlow( &self, cx: &mut JSContext, value: Option<RootedCallback<EventHandlerNonNull<D>>>, )
fn GetOnerror( &self, cx: &mut JSContext, ) -> Option<RootedCallback<EventHandlerNonNull<D>>>
fn SetOnerror( &self, cx: &mut JSContext, value: Option<RootedCallback<EventHandlerNonNull<D>>>, )
fn GetOnclosing( &self, cx: &mut JSContext, ) -> Option<RootedCallback<EventHandlerNonNull<D>>>
fn SetOnclosing( &self, cx: &mut JSContext, value: Option<RootedCallback<EventHandlerNonNull<D>>>, )
fn GetOnclose( &self, cx: &mut JSContext, ) -> Option<RootedCallback<EventHandlerNonNull<D>>>
fn SetOnclose( &self, cx: &mut JSContext, value: Option<RootedCallback<EventHandlerNonNull<D>>>, )
fn Close(&self)
fn GetOnmessage( &self, cx: &mut JSContext, ) -> Option<RootedCallback<EventHandlerNonNull<D>>>
fn SetOnmessage( &self, cx: &mut JSContext, value: Option<RootedCallback<EventHandlerNonNull<D>>>, )
fn BinaryType(&self) -> DOMString
fn SetBinaryType(&self, value: DOMString) -> Result<(), Error>
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>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".