pub struct Client { /* private fields */ }Implementations§
Source§impl Client
impl Client
pub fn new(ui_url: Url) -> Client
pub async fn event_stream(&self) -> Result<EventStream, ClientError>
pub async fn files( &self, query: FilesQuery, ) -> Result<impl Stream<Item = Result<(LsResponse, String), UiServerError>>, ClientError>
pub async fn download(&self, peer_path: &PeerPath) -> Result<u32, ClientError>
pub async fn connect(&self, announce_address: String) -> Result<(), ClientError>
pub async fn read( &self, peer_name: String, read_query: ReadQuery, ) -> Result<impl Stream<Item = Result<Bytes, Error>>, ClientError>
pub async fn info(&self) -> Result<Info, ClientError>
pub async fn requested_files( &self, id: u32, ) -> Result<impl Stream<Item = Result<Vec<UiRequestedFile>, UiServerError>>, ClientError>
pub async fn requests( &self, ) -> Result<impl Stream<Item = Result<Vec<UiDownloadRequest>, UiServerError>>, ClientError>
pub async fn shut_down(&self) -> Result<(), ClientError>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Client
impl !UnwindSafe for Client
impl Freeze for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnsafeUnpin for Client
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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