pub struct EncodeOptions {
pub canonical: bool,
}Expand description
Options for encoding edits.
Fields§
§canonical: boolEnable canonical encoding mode.
When enabled:
- Dictionary entries are sorted by ID bytes (lexicographic)
- This ensures deterministic output for the same logical edit
Use canonical mode when:
- Computing content hashes for deduplication
- Creating signatures over edit content
- Ensuring cross-implementation reproducibility
Note: Canonical mode requires two passes over the ops and is slower than non-canonical encoding.
Implementations§
Trait Implementations§
Source§impl Clone for EncodeOptions
impl Clone for EncodeOptions
Source§fn clone(&self) -> EncodeOptions
fn clone(&self) -> EncodeOptions
Returns a duplicate of the value. Read more
1.0.0 · 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 EncodeOptions
impl Debug for EncodeOptions
Source§impl Default for EncodeOptions
impl Default for EncodeOptions
Source§fn default() -> EncodeOptions
fn default() -> EncodeOptions
Returns the “default value” for a type. Read more
impl Copy for EncodeOptions
Auto Trait Implementations§
impl Freeze for EncodeOptions
impl RefUnwindSafe for EncodeOptions
impl Send for EncodeOptions
impl Sync for EncodeOptions
impl Unpin for EncodeOptions
impl UnwindSafe for EncodeOptions
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