Enum cyfs_base::ChunkState
source · [−]pub enum ChunkState {
Unknown,
NotFound,
Pending,
OnAir,
Ready,
Ignore,
}Expand description
Chunk 存活状态机、
- 默认不存在
- 如果应用层表示感兴趣并且没有在被忽略路由里,则进入New状态
- 如果从关联的DeviceInfo获得或者被动收到广播,则进入Ready状态
- 如果在路由里配置了忽略,则进入Ignore状态
Variants
Unknown
NotFound
Pending
OnAir
Ready
Ignore
Trait Implementations
sourceimpl Clone for ChunkState
impl Clone for ChunkState
sourcefn clone(&self) -> ChunkState
fn clone(&self) -> ChunkState
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for ChunkState
impl Debug for ChunkState
sourceimpl<'de> Deserialize<'de> for ChunkState
impl<'de> Deserialize<'de> for ChunkState
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl From<&ChunkState> for u8
impl From<&ChunkState> for u8
sourcefn from(value: &ChunkState) -> Self
fn from(value: &ChunkState) -> Self
Converts to this type from the input type.
sourceimpl From<ChunkState> for u8
impl From<ChunkState> for u8
sourcefn from(value: ChunkState) -> Self
fn from(value: ChunkState) -> Self
Converts to this type from the input type.
sourceimpl Ord for ChunkState
impl Ord for ChunkState
sourcefn cmp(&self, other: &ChunkState) -> Ordering
fn cmp(&self, other: &ChunkState) -> Ordering
1.21.0 · sourceconst fn max(self, other: Self) -> Self
const fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourceconst fn min(self, other: Self) -> Self
const fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourceconst fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
const fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<ChunkState> for ChunkState
impl PartialEq<ChunkState> for ChunkState
sourcefn eq(&self, other: &ChunkState) -> bool
fn eq(&self, other: &ChunkState) -> bool
sourceimpl PartialOrd<ChunkState> for ChunkState
impl PartialOrd<ChunkState> for ChunkState
sourcefn partial_cmp(&self, other: &ChunkState) -> Option<Ordering>
fn partial_cmp(&self, other: &ChunkState) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresourceimpl Serialize for ChunkState
impl Serialize for ChunkState
sourceimpl TryFrom<u8> for ChunkState
impl TryFrom<u8> for ChunkState
impl Copy for ChunkState
impl Eq for ChunkState
impl StructuralEq for ChunkState
impl StructuralPartialEq for ChunkState
Auto Trait Implementations
impl RefUnwindSafe for ChunkState
impl Send for ChunkState
impl Sync for ChunkState
impl Unpin for ChunkState
impl UnwindSafe for ChunkState
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more