pub struct PieceTable {
pub pieces: Vec<Piece>,
pub grpprls: Vec<Vec<u8>>,
}Fields§
§pieces: Vec<Piece>§grpprls: Vec<Vec<u8>>Property-modifier grpprls hoisted from the Clx Prc entries; referenced by Pcd.prm in fast-saved documents.
Implementations§
Source§impl PieceTable
impl PieceTable
Sourcepub fn parse(clx: &[u8]) -> Result<PieceTable, String>
pub fn parse(clx: &[u8]) -> Result<PieceTable, String>
Parses a Clx: zero or more Prc entries (0x01) followed by one Pcdt (0x02).
pub fn cp_max(&self) -> u32
pub fn piece_for(&self, cp: u32) -> Option<&Piece>
Trait Implementations§
Auto Trait Implementations§
impl Forget for PieceTable
impl Freeze for PieceTable
impl RefUnwindSafe for PieceTable
impl Send for PieceTable
impl Sync for PieceTable
impl Unpin for PieceTable
impl UnsafeUnpin for PieceTable
impl UnwindSafe for PieceTable
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more