pub struct StreamBounds { /* private fields */ }Expand description
Where each /Contents element’s operators begin, within one flat operator
list.
A page’s content is the concatenation of its /Contents streams, and the
interpreter reads it as one run — a q in one element is closed by the Q
in the next, which is legal and common. The editor still needs to know
which element each object came from, so the boundaries travel alongside the
operators rather than being recovered from them.
starts[i] is the index of the first operator belonging to element i.
An empty record means a single unsplit stream: everything is element 0.
Implementations§
Source§impl StreamBounds
impl StreamBounds
Sourcepub fn from_counts(counts: impl IntoIterator<Item = usize>) -> Self
pub fn from_counts(counts: impl IntoIterator<Item = usize>) -> Self
The boundaries for content split into elements of the given operator counts.
Sourcepub fn from_joined(
bytes: &[u8],
total_ops: usize,
ends: &[usize],
limits: &Limits,
) -> Self
pub fn from_joined( bytes: &[u8], total_ops: usize, ends: &[usize], limits: &Limits, ) -> Self
The boundaries for content joined from elements ending at the given byte offsets.
ends[i] is one past the last byte of element i, counting the
separator a join inserts. A single element — or none — yields the
default, where everything is element 0.
Trait Implementations§
Source§impl Clone for StreamBounds
impl Clone for StreamBounds
Source§fn clone(&self) -> StreamBounds
fn clone(&self) -> StreamBounds
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more