pub struct SourceRegion {
pub kind: SourceRegionKind,
pub source_story_index: Option<usize>,
pub block_start: usize,
pub block_end: usize,
pub source_start_cp: usize,
pub source_len_cp: usize,
pub text_start: usize,
pub text_len: usize,
}Expand description
A span of DocModel::blocks that came from one source subdocument.
Fields§
§kind: SourceRegionKindRegion kind.
source_story_index: Option<usize>Source-specific story index within the subdocument, when a format table
exposes one. For legacy .doc header/footer regions this is the
PlcfHdd story index.
block_start: usizeInclusive start block index in DocModel::blocks.
block_end: usizeExclusive end block index in DocModel::blocks.
source_start_cp: usizeUTF-16 CP start in the original Word source stream.
source_len_cp: usizeUTF-16 CP length reported by the source metadata.
text_start: usizeVisible character start within the flattened model text.
text_len: usizeVisible character length contributed by this region.
Trait Implementations§
Source§impl Clone for SourceRegion
impl Clone for SourceRegion
Source§fn clone(&self) -> SourceRegion
fn clone(&self) -> SourceRegion
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SourceRegion
impl Debug for SourceRegion
impl Eq for SourceRegion
Source§impl PartialEq for SourceRegion
impl PartialEq for SourceRegion
Source§fn eq(&self, other: &SourceRegion) -> bool
fn eq(&self, other: &SourceRegion) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SourceRegion
Auto Trait Implementations§
impl Freeze for SourceRegion
impl RefUnwindSafe for SourceRegion
impl Send for SourceRegion
impl Sync for SourceRegion
impl Unpin for SourceRegion
impl UnsafeUnpin for SourceRegion
impl UnwindSafe for SourceRegion
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.