Struct libp2p_wasm_ext::ffi::Transport [−][src]
#[repr(transparent)]pub struct Transport { /* fields omitted */ }
Type of the object that allows opening connections.
Implementations
impl Transport[src]
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]
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 FromWasmAbi for Transport[src]
impl FromWasmAbi for Transport[src]impl IntoWasmAbi for Transport[src]
impl IntoWasmAbi for Transport[src]impl<'a> IntoWasmAbi for &'a Transport[src]
impl<'a> IntoWasmAbi for &'a Transport[src]impl JsCast for Transport[src]
impl JsCast for Transport[src]fn instanceof(val: &JsValue) -> bool[src]
fn unchecked_from_js(val: JsValue) -> Self[src]
fn unchecked_from_js_ref(val: &JsValue) -> &Self[src]
pub fn has_type<T>(&self) -> bool where
T: JsCast, [src]
T: JsCast,
pub fn dyn_into<T>(self) -> Result<T, Self> where
T: JsCast, [src]
T: JsCast,
pub fn dyn_ref<T>(&self) -> Option<&T> where
T: JsCast, [src]
T: JsCast,
pub fn unchecked_into<T>(self) -> T where
T: JsCast, [src]
T: JsCast,
pub fn unchecked_ref<T>(&self) -> &T where
T: JsCast, [src]
T: JsCast,
pub fn is_instance_of<T>(&self) -> bool where
T: JsCast, [src]
T: JsCast,
pub fn is_type_of(val: &JsValue) -> bool[src]
impl RefFromWasmAbi for 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
unsafe fn ref_from_abi(js: Self::Abi) -> Self::Anchor[src]
Auto Trait Implementations
impl RefUnwindSafe for Transport
impl !Send for Transport
impl !Sync for Transport
impl Unpin for Transport
impl UnwindSafe for Transport
Blanket Implementations
impl<T> ReturnWasmAbi for T where
T: IntoWasmAbi, [src]
impl<T> ReturnWasmAbi for T where
T: IntoWasmAbi, [src]type Abi = <T as IntoWasmAbi>::Abi
Same as IntoWasmAbi::Abi