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)
pub fn is_full(&self) -> bool
pub fn contains_flac_header(&self) -> bool
pub fn to_range_header(&self) -> Option<String>
pub fn to_content_range_header(&self) -> String
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Range
impl Send for Range
impl Sync for Range
impl Unpin for Range
impl UnwindSafe for Range
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