pub struct ShardCoverage {
pub total: u32,
pub missing: Vec<u32>,
pub holes: Vec<(u64, u64)>,
}Expand description
分片集合的缺片情况,用于降级播放(规范 §8.4)。
Fields§
§total: u32总片数。
missing: Vec<u32>缺失的片序号。
holes: Vec<(u64, u64)>缺失区间在原密文中的 (偏移, 长度),落在这些区间的读取必须失败。
Implementations§
Source§impl ShardCoverage
impl ShardCoverage
Sourcepub fn is_readable(&self, offset: u64, length: u64) -> bool
pub fn is_readable(&self, offset: u64, length: u64) -> bool
某个密文区间是否完整可读。
Trait Implementations§
Source§impl Clone for ShardCoverage
impl Clone for ShardCoverage
Source§impl Debug for ShardCoverage
impl Debug for ShardCoverage
impl Eq for ShardCoverage
Source§impl PartialEq for ShardCoverage
impl PartialEq for ShardCoverage
impl StructuralPartialEq for ShardCoverage
Auto Trait Implementations§
impl Forget for ShardCoverage
impl Freeze for ShardCoverage
impl RefUnwindSafe for ShardCoverage
impl Send for ShardCoverage
impl Sync for ShardCoverage
impl Unpin for ShardCoverage
impl UnsafeUnpin for ShardCoverage
impl UnwindSafe for ShardCoverage
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