Struct lava_torrent::tracker::SwarmMetadata
source · pub struct SwarmMetadata {
pub complete: Integer,
pub incomplete: Integer,
pub downloaded: Integer,
pub extra_fields: Option<Dictionary>,
}
Expand description
Swarm metadata returned in a tracker scrape response.
Modeled after the specifications in
BEP 48.
Unknown/extension fields will be placed in extra_fields
. If you
need any of those extra fields you would have to parse it yourself.
Fields§
§complete: Integer
The number of active peers that have completed downloading.
incomplete: Integer
The number of active peers that have not completed downloading.
downloaded: Integer
The number of peers that have ever completed downloading.
extra_fields: Option<Dictionary>
Fields not listed above.
Trait Implementations§
source§impl Clone for SwarmMetadata
impl Clone for SwarmMetadata
source§fn clone(&self) -> SwarmMetadata
fn clone(&self) -> SwarmMetadata
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SwarmMetadata
impl Debug for SwarmMetadata
source§impl Display for SwarmMetadata
impl Display for SwarmMetadata
source§impl PartialEq<SwarmMetadata> for SwarmMetadata
impl PartialEq<SwarmMetadata> for SwarmMetadata
source§fn eq(&self, other: &SwarmMetadata) -> bool
fn eq(&self, other: &SwarmMetadata) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for SwarmMetadata
impl StructuralEq for SwarmMetadata
impl StructuralPartialEq for SwarmMetadata
Auto Trait Implementations§
impl RefUnwindSafe for SwarmMetadata
impl Send for SwarmMetadata
impl Sync for SwarmMetadata
impl Unpin for SwarmMetadata
impl UnwindSafe for SwarmMetadata
Blanket Implementations§
source§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere Scheme: ApproxScheme,
source§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
Convert the given value into an approximately equivalent representation.
source§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere Dst: ApproxFrom<Src, Scheme>, Scheme: ApproxScheme,
§type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
The error type produced by a failed conversion.
source§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Convert the subject into an approximately equivalent representation.
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, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
source§fn approx(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, DefaultApprox>,
fn approx(self) -> Result<Dst, Self::Err>where Self: Sized + ApproxInto<Dst, DefaultApprox>,
Approximate the subject with the default scheme.
source§fn approx_by<Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
fn approx_by<Scheme>(self) -> Result<Dst, Self::Err>where Self: Sized + ApproxInto<Dst, Scheme>, Scheme: ApproxScheme,
Approximate the subject with a specific scheme.
source§impl<T> ConvUtil for T
impl<T> ConvUtil for T
source§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, DefaultApprox>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where Self: Sized + ApproxInto<Dst, DefaultApprox>,
Approximate the subject to a given type with the default scheme.
source§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where Self: Sized + ApproxInto<Dst, Scheme>, Scheme: ApproxScheme,
Approximate the subject to a given type with a specific scheme.
source§fn into_as<Dst>(self) -> Dstwhere
Self: Sized + Into<Dst>,
fn into_as<Dst>(self) -> Dstwhere Self: Sized + Into<Dst>,
Convert the subject to a given type.