pub enum SourceRetention {
Retain,
DropText,
DropAll,
}Expand description
Source buffer retention policy
Controls memory vs. error reporting trade-off:
Retain: Full source text available (~200KB per 200KB schema)DropText: Only line starts (~10KB per 200KB schema, 90% savings)DropAll: No location info (minimal memory)
Variants§
Retain
Keep source text for rich errors and XmlFragment access
DropText
Drop source text after parsing; keep only line_starts
DropAll
Drop entire SourceMap after parsing; no location info
Trait Implementations§
Source§impl Clone for SourceRetention
impl Clone for SourceRetention
Source§fn clone(&self) -> SourceRetention
fn clone(&self) -> SourceRetention
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 moreimpl Copy for SourceRetention
Source§impl Debug for SourceRetention
impl Debug for SourceRetention
Source§impl Default for SourceRetention
impl Default for SourceRetention
Source§fn default() -> SourceRetention
fn default() -> SourceRetention
Returns the “default value” for a type. Read more
impl Eq for SourceRetention
Source§impl PartialEq for SourceRetention
impl PartialEq for SourceRetention
Source§fn eq(&self, other: &SourceRetention) -> bool
fn eq(&self, other: &SourceRetention) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SourceRetention
Auto Trait Implementations§
impl Freeze for SourceRetention
impl RefUnwindSafe for SourceRetention
impl Send for SourceRetention
impl Sync for SourceRetention
impl Unpin for SourceRetention
impl UnsafeUnpin for SourceRetention
impl UnwindSafe for SourceRetention
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