pub struct ByteRange {
pub length: u64,
pub offset: Option<u64>,
}Expand description
A byte sub-range into a resource.
Shared by three tags that all use the same underlying notation:
#EXT-X-BYTERANGE:<n>[@<o>](RFC 8216bis §4.4.4.2) —MediaSegment::byte_range.#EXT-X-PART’sBYTERANGE="<n>[@<o>]"attribute (RFC 8216bis §4.4.4.9, “same format as the EXT-X-BYTERANGE tag”) —PartSpec::byte_range.#EXT-X-MAP’sBYTERANGE="<n>@<o>"attribute (RFC 8216bis §4.4.4.5) —MapTag::byte_range. Unlike the other two, the spec says the offsetois REQUIRED here (there is no “previous sub-range” to continue from for an Initialization Section).
Fields§
§length: u64n — length of the sub-range in bytes.
offset: Option<u64>o — byte offset of the sub-range from the start of the resource.
None means “immediately following the previous Media/Partial
Segment’s sub-range of the same resource” (only meaningful for
EXT-X-BYTERANGE/EXT-X-PART’s BYTERANGE; EXT-X-MAP’s
BYTERANGE always carries Some).
Trait Implementations§
impl Copy for ByteRange
impl Eq for ByteRange
impl StructuralPartialEq for ByteRange
Auto Trait Implementations§
impl Freeze for ByteRange
impl RefUnwindSafe for ByteRange
impl Send for ByteRange
impl Sync for ByteRange
impl Unpin for ByteRange
impl UnsafeUnpin for ByteRange
impl UnwindSafe for ByteRange
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