pub struct BtUploadSession { /* private fields */ }Implementations§
Source§impl BtUploadSession
impl BtUploadSession
pub fn new(conn: PeerConnection, config: &BtSeedingConfig) -> Self
pub async fn handle_incoming_messages( &mut self, provider: &dyn PieceDataProvider, ) -> Result<u64>
pub async fn unchoke_peer(&mut self) -> Result<()>
pub async fn choke_peer(&mut self) -> Result<()>
pub fn is_peer_choked(&self) -> bool
pub fn is_peer_interested(&self) -> bool
pub fn is_dead(&self) -> bool
pub fn uploaded_bytes(&self) -> u64
pub fn connection_mut(&mut self) -> &mut PeerConnection
Auto Trait Implementations§
impl !Freeze for BtUploadSession
impl RefUnwindSafe for BtUploadSession
impl Send for BtUploadSession
impl Sync for BtUploadSession
impl Unpin for BtUploadSession
impl UnsafeUnpin for BtUploadSession
impl UnwindSafe for BtUploadSession
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