pub struct V4Quirks { /* private fields */ }Expand description
A v4.5 notebook that violated the 4.5 spec on load.
Missing cell ids have already been filled with fresh UUIDs by the
lenient deserializer — notebook is safe to inspect, but the bytes
on disk did not carry these ids. Callers must explicitly promote
this via V4Quirks::repair before the result is considered a
spec-compliant v4::Notebook.
Implementations§
Source§impl V4Quirks
impl V4Quirks
Sourcepub fn notebook(&self) -> &Notebook
pub fn notebook(&self) -> &Notebook
Borrow the parsed notebook. Fabricated cell ids are already present in the returned reference.
Sourcepub fn repair(self) -> Notebook
pub fn repair(self) -> Notebook
Consume and promote to a valid v4::Notebook.
Because the lenient deserializer already filled missing ids with fresh UUIDs, this is a type-system promotion, not a runtime mutation. The fabricated ids become authoritative. Callers that want stable ids across future loads should persist the repaired notebook back to disk.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for V4Quirks
impl RefUnwindSafe for V4Quirks
impl Send for V4Quirks
impl Sync for V4Quirks
impl Unpin for V4Quirks
impl UnsafeUnpin for V4Quirks
impl UnwindSafe for V4Quirks
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