pub enum Shrink {
Keep,
Cut(Strategy),
MustOffload,
}Expand description
What has to happen to one piece of text: decided here, carried out by the caller.
Exhaustive, and MustOffload is why it exists: “do not shorten it”
is an answer the caller cannot read as “shorten it plainly, then”,
so this crate holds one answer to whether structured data may be
truncated.
Variants§
Keep
It is within budget and goes to the model unchanged.
Cut(Strategy)
Shorten it, keeping this end.
MustOffload
Do not shorten it at all — move it out of the window and leave a reference. Truncated structured data is worse than absent structured data, because it looks like it can be parsed.
Trait Implementations§
impl Copy for Shrink
impl Eq for Shrink
impl StructuralPartialEq for Shrink
Auto Trait Implementations§
impl Freeze for Shrink
impl RefUnwindSafe for Shrink
impl Send for Shrink
impl Sync for Shrink
impl Unpin for Shrink
impl UnsafeUnpin for Shrink
impl UnwindSafe for Shrink
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