pub struct PeerBuilder { /* private fields */ }Implementations§
Source§impl PeerBuilder
impl PeerBuilder
pub fn seeder() -> Self
pub fn leecher() -> Self
pub fn with_peer_id(self, peer_id: &PeerId) -> Self
pub fn with_peer_addr(self, peer_addr: &SocketAddr) -> Self
pub fn with_bytes_pending_to_download(self, left: i64) -> Self
pub fn with_no_bytes_pending_to_download(self) -> Self
pub fn last_updated_on(self, updated: DurationSinceUnixEpoch) -> Self
pub fn build(self) -> Peer
pub fn into(self) -> Peer
Trait Implementations§
Source§impl Debug for PeerBuilder
impl Debug for PeerBuilder
Source§impl Default for PeerBuilder
impl Default for PeerBuilder
Source§impl PartialEq for PeerBuilder
impl PartialEq for PeerBuilder
impl StructuralPartialEq for PeerBuilder
Auto Trait Implementations§
impl Freeze for PeerBuilder
impl RefUnwindSafe for PeerBuilder
impl Send for PeerBuilder
impl Sync for PeerBuilder
impl Unpin for PeerBuilder
impl UnwindSafe for PeerBuilder
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more