Enum dragonfly_api::common::Priority
source · #[repr(i32)]pub enum Priority {
Level0,
Level1,
Level2,
Level3,
Level4,
Level5,
Level6,
}
Expand description
Priority represents priority of application.
Variants§
Level0
LEVEL0 has no special meaning for scheduler.
Level1
LEVEL1 represents the download task is forbidden, and an error code is returned during the registration.
Level2
LEVEL2 represents when the task is downloaded for the first time, allow peers to download from the other peers, but not back-to-source. When the task is not downloaded for the first time, it is scheduled normally.
Level3
LEVEL3 represents when the task is downloaded for the first time, the normal peer is first to download back-to-source. When the task is not downloaded for the first time, it is scheduled normally.
Level4
LEVEL4 represents when the task is downloaded for the first time, the weak peer is first triggered to back-to-source. When the task is not downloaded for the first time, it is scheduled normally.
Level5
LEVEL5 represents when the task is downloaded for the first time, the strong peer is first triggered to back-to-source. When the task is not downloaded for the first time, it is scheduled normally.
Level6
LEVEL6 represents when the task is downloaded for the first time, the super peer is first triggered to back-to-source. When the task is not downloaded for the first time, it is scheduled normally.
Implementations§
source§impl Priority
impl Priority
sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
source§impl Ord for Priority
impl Ord for Priority
source§impl PartialEq<Priority> for Priority
impl PartialEq<Priority> for Priority
source§impl PartialOrd<Priority> for Priority
impl PartialOrd<Priority> for Priority
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Priority
impl Eq for Priority
impl StructuralEq for Priority
impl StructuralPartialEq for Priority
Auto Trait Implementations§
impl RefUnwindSafe for Priority
impl Send for Priority
impl Sync for Priority
impl Unpin for Priority
impl UnwindSafe for Priority
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
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request