[][src]Struct stdweb::web::event::SocketCloseEvent

pub struct SocketCloseEvent(_);

A SocketCloseEvent is sent to clients using WebSockets when the connection is closed.

(JavaScript docs)

Methods

impl SocketCloseEvent[src]

pub fn code(&self) -> SocketCloseCode[src]

Returns the close code sent by the server.

(JavaScript docs)

pub fn reason(&self) -> String[src]

Returns the reason the server closed the connection. This is specific to the particular server and sub-protocol.

(JavaScript docs)

pub fn was_clean(&self) -> bool[src]

Returns whether or not the connection was cleanly closed.

(JavaScript docs)

Trait Implementations

impl JsSerialize for SocketCloseEvent[src]

impl TryFrom<SocketCloseEvent> for Reference[src]

type Error = Void

The type returned in the event of a conversion error.

impl TryFrom<Reference> for SocketCloseEvent[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl<'_r> TryFrom<&'_r Reference> for SocketCloseEvent[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<Value> for SocketCloseEvent[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl<'_r> TryFrom<&'_r Value> for SocketCloseEvent[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl InstanceOf for SocketCloseEvent[src]

impl ReferenceType for SocketCloseEvent[src]

impl IEvent for SocketCloseEvent[src]

impl ConcreteEvent for SocketCloseEvent[src]

impl AsRef<Reference> for SocketCloseEvent[src]

impl From<SocketCloseEvent> for Reference[src]

impl Clone for SocketCloseEvent[src]

impl Eq for SocketCloseEvent[src]

impl PartialEq<SocketCloseEvent> for SocketCloseEvent[src]

impl Debug for SocketCloseEvent[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]