Struct anni_provider::Range
source · pub struct Range {
pub start: u64,
pub end: Option<u64>,
pub total: Option<u64>,
}Fields§
§start: u64§end: Option<u64>§total: Option<u64>Implementations§
source§impl Range
impl Range
pub const FULL: Range = _
pub const FLAC_HEADER: Range = _
sourcepub fn new(start: u64, end: Option<u64>) -> Self
pub fn new(start: u64, end: Option<u64>) -> Self
create a new range with given start and end offset
sourcepub fn length(&self) -> Option<u64>
pub fn length(&self) -> Option<u64>
get the length of the range if the range is full, returns None
sourcepub fn length_limit(&self, limit: u64) -> u64
pub fn length_limit(&self, limit: u64) -> u64
return length limited by a limit(usually actual file size)