pub(crate) trait EventSourceMethods<D: DomTypes> {
// Required methods
fn Url(&self) -> DOMString;
fn WithCredentials(&self) -> bool;
fn ReadyState(&self) -> u16;
fn GetOnopen(&self) -> Option<Rc<EventHandlerNonNull<D>>>;
fn SetOnopen(&self, value: Option<Rc<EventHandlerNonNull<D>>>);
fn GetOnmessage(&self) -> Option<Rc<EventHandlerNonNull<D>>>;
fn SetOnmessage(&self, value: Option<Rc<EventHandlerNonNull<D>>>);
fn GetOnerror(&self) -> Option<Rc<EventHandlerNonNull<D>>>;
fn SetOnerror(&self, value: Option<Rc<EventHandlerNonNull<D>>>);
fn Close(&self);
fn Constructor(
global: &D::GlobalScope,
proto: Option<HandleObject<'_>>,
can_gc: CanGc,
url: DOMString,
eventSourceInitDict: &EventSourceInit,
) -> Fallible<DomRoot<D::EventSource>>;
}
Required Methods§
fn Url(&self) -> DOMString
fn WithCredentials(&self) -> bool
fn ReadyState(&self) -> u16
fn GetOnopen(&self) -> Option<Rc<EventHandlerNonNull<D>>>
fn SetOnopen(&self, value: Option<Rc<EventHandlerNonNull<D>>>)
fn GetOnmessage(&self) -> Option<Rc<EventHandlerNonNull<D>>>
fn SetOnmessage(&self, value: Option<Rc<EventHandlerNonNull<D>>>)
fn GetOnerror(&self) -> Option<Rc<EventHandlerNonNull<D>>>
fn SetOnerror(&self, value: Option<Rc<EventHandlerNonNull<D>>>)
fn Close(&self)
fn Constructor( global: &D::GlobalScope, proto: Option<HandleObject<'_>>, can_gc: CanGc, url: DOMString, eventSourceInitDict: &EventSourceInit, ) -> Fallible<DomRoot<D::EventSource>>
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.