[][src]Struct libp2p_wasm_ext::ffi::Transport

#[repr(transparent)]pub struct Transport { /* fields omitted */ }

Type of the object that allows opening connections.

Implementations

impl Transport[src]

pub fn dial(&self, multiaddr: &str) -> Result<Promise, JsValue>[src]

Start attempting to dial the given multiaddress.

The returned Promise must yield a Connection on success.

If the multiaddress is not supported, you should return an instance of Error whose name property has been set to the string "NotSupportedError".

impl Transport[src]

pub fn listen_on(&self, multiaddr: &str) -> Result<Iterator, JsValue>[src]

Start listening on the given multiaddress.

The returned Iterator must yield Promises to ListenEvent events.

If the multiaddress is not supported, you should return an instance of Error whose name property has been set to the string "NotSupportedError".

Trait Implementations

impl AsRef<JsValue> for Transport[src]

impl AsRef<Transport> for Transport[src]

impl Deref for Transport[src]

type Target = JsValue

The resulting type after dereferencing.

impl From<JsValue> for Transport[src]

impl From<Transport> for JsValue[src]

impl FromWasmAbi for Transport[src]

type Abi = <JsValue as FromWasmAbi>::Abi

The wasm ABI type that this converts from when coming back out from the ABI boundary. Read more

impl IntoWasmAbi for Transport[src]

type Abi = <JsValue as IntoWasmAbi>::Abi

The wasm ABI type that this converts into when crossing the ABI boundary. Read more

impl<'a> IntoWasmAbi for &'a Transport[src]

type Abi = <&'a JsValue as IntoWasmAbi>::Abi

The wasm ABI type that this converts into when crossing the ABI boundary. Read more

impl JsCast for Transport[src]

impl OptionFromWasmAbi for Transport[src]

impl OptionIntoWasmAbi for Transport[src]

impl<'a> OptionIntoWasmAbi for &'a Transport[src]

impl RefFromWasmAbi for Transport[src]

type Abi = <JsValue as RefFromWasmAbi>::Abi

The wasm ABI type references to Self are recovered from.

type Anchor = ManuallyDrop<Transport>

The type that holds the reference to Self for the duration of the invocation of the function that has an &Self parameter. This is required to ensure that the lifetimes don't persist beyond one function call, and so that they remain anonymous. Read more

impl WasmDescribe for Transport[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

impl<T> ReturnWasmAbi for T where
    T: IntoWasmAbi
[src]

type Abi = <T as IntoWasmAbi>::Abi

Same as IntoWasmAbi::Abi

impl<T> Same<T> for T

type Output = T

Should always be Self

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<V, T> VZip<V> for T where
    V: MultiLane<T>,