pub struct WebTorrentClient { /* private fields */ }Implementations§
Source§impl WebTorrentClient
impl WebTorrentClient
pub fn new() -> Self
pub async fn seed( &self, input: JsValue, opts_str: String, ) -> Result<JsValue, JsValue>
pub async fn add(&self, torrent_id: String) -> Result<JsValue, JsValue>
pub fn create_server(&self, options: Option<String>, force: bool) -> JsValue
pub async fn get_torrent(&self, torrent_id: String) -> Result<JsValue, JsValue>
pub fn remove(&self, torrent_id: String)
pub fn throttle_download(&self, rate: f64)
pub fn throttle_upload(&self, rate: f64)
pub fn destroy(&self)
pub fn is_readable(&self, obj: JsValue) -> bool
pub fn is_file_list(&self, obj: JsValue) -> bool
Trait Implementations§
Source§impl From<WebTorrentClient> for JsValue
impl From<WebTorrentClient> for JsValue
Source§fn from(value: WebTorrentClient) -> Self
fn from(value: WebTorrentClient) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for WebTorrentClient
impl FromWasmAbi for WebTorrentClient
Source§impl IntoWasmAbi for WebTorrentClient
impl IntoWasmAbi for WebTorrentClient
Source§impl OptionFromWasmAbi for WebTorrentClient
impl OptionFromWasmAbi for WebTorrentClient
Source§impl OptionIntoWasmAbi for WebTorrentClient
impl OptionIntoWasmAbi for WebTorrentClient
Source§impl RefFromWasmAbi for WebTorrentClient
impl RefFromWasmAbi for WebTorrentClient
Source§type Anchor = RcRef<WebTorrentClient>
type Anchor = RcRef<WebTorrentClient>
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.Source§impl RefMutFromWasmAbi for WebTorrentClient
impl RefMutFromWasmAbi for WebTorrentClient
impl SupportsConstructor for WebTorrentClient
impl SupportsInstanceProperty for WebTorrentClient
impl SupportsStaticProperty for WebTorrentClient
Source§impl TryFromJsValue for WebTorrentClient
impl TryFromJsValue for WebTorrentClient
Source§impl VectorFromWasmAbi for WebTorrentClient
impl VectorFromWasmAbi for WebTorrentClient
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[WebTorrentClient]>
Source§impl VectorIntoJsValue for WebTorrentClient
impl VectorIntoJsValue for WebTorrentClient
fn vector_into_jsvalue(vector: Box<[WebTorrentClient]>) -> JsValue
Source§impl VectorIntoWasmAbi for WebTorrentClient
impl VectorIntoWasmAbi for WebTorrentClient
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[WebTorrentClient]>) -> Self::Abi
Source§impl WasmDescribeVector for WebTorrentClient
impl WasmDescribeVector for WebTorrentClient
Auto Trait Implementations§
impl !Send for WebTorrentClient
impl !Sync for WebTorrentClient
impl Freeze for WebTorrentClient
impl RefUnwindSafe for WebTorrentClient
impl Unpin for WebTorrentClient
impl UnsafeUnpin for WebTorrentClient
impl UnwindSafe for WebTorrentClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.