pub enum MarkerPlaceholder {
OmittedBytes,
OriginalBytes,
OffsetStart,
OffsetEnd,
SpillRef,
}Expand description
Named placeholders supported in custom marker templates.
Variants§
OmittedBytes
Number of bytes omitted from the middle ("{omitted_bytes}").
OriginalBytes
Total byte length of the original un-truncated input ("{original_bytes}").
OffsetStart
Starting byte offset in original input where truncation began ("{offset_start}").
OffsetEnd
Ending byte offset in original input where truncation ended ("{offset_end}").
SpillRef
Typed reference handle for recall ("{ref}").
Implementations§
Source§impl MarkerPlaceholder
impl MarkerPlaceholder
Sourcepub const TOKEN_OMITTED_BYTES: &'static str = "{omitted_bytes}"
pub const TOKEN_OMITTED_BYTES: &'static str = "{omitted_bytes}"
Canonical token string for MarkerPlaceholder::OmittedBytes.
Sourcepub const TOKEN_ORIGINAL_BYTES: &'static str = "{original_bytes}"
pub const TOKEN_ORIGINAL_BYTES: &'static str = "{original_bytes}"
Canonical token string for MarkerPlaceholder::OriginalBytes.
Sourcepub const TOKEN_OFFSET_START: &'static str = "{offset_start}"
pub const TOKEN_OFFSET_START: &'static str = "{offset_start}"
Canonical token string for MarkerPlaceholder::OffsetStart.
Sourcepub const TOKEN_OFFSET_END: &'static str = "{offset_end}"
pub const TOKEN_OFFSET_END: &'static str = "{offset_end}"
Canonical token string for MarkerPlaceholder::OffsetEnd.
Sourcepub const TOKEN_SPILL_REF: &'static str = "{ref}"
pub const TOKEN_SPILL_REF: &'static str = "{ref}"
Canonical token string for MarkerPlaceholder::SpillRef.
Sourcepub const DEPRECATED_COUNT: &'static str = "{count}"
pub const DEPRECATED_COUNT: &'static str = "{count}"
Legacy deprecated placeholder {count} (alias of {omitted_bytes}).
Sourcepub const DEPRECATED_BYTES: &'static str = "{bytes}"
pub const DEPRECATED_BYTES: &'static str = "{bytes}"
Legacy deprecated placeholder {bytes} (alias of {omitted_bytes}).
Sourcepub const DEPRECATED_N: &'static str = "<N>"
pub const DEPRECATED_N: &'static str = "<N>"
Legacy deprecated placeholder <N> (alias of {omitted_bytes}).
Trait Implementations§
Source§impl Clone for MarkerPlaceholder
impl Clone for MarkerPlaceholder
impl Copy for MarkerPlaceholder
Source§impl Debug for MarkerPlaceholder
impl Debug for MarkerPlaceholder
impl Eq for MarkerPlaceholder
Source§impl Hash for MarkerPlaceholder
impl Hash for MarkerPlaceholder
Source§impl PartialEq for MarkerPlaceholder
impl PartialEq for MarkerPlaceholder
impl StructuralPartialEq for MarkerPlaceholder
Auto Trait Implementations§
impl Freeze for MarkerPlaceholder
impl RefUnwindSafe for MarkerPlaceholder
impl Send for MarkerPlaceholder
impl Sync for MarkerPlaceholder
impl Unpin for MarkerPlaceholder
impl UnsafeUnpin for MarkerPlaceholder
impl UnwindSafe for MarkerPlaceholder
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.