pub struct FitOptions {
pub limits: Limits,
pub tail: Vec<Block>,
pub truncation_notice: Vec<Block>,
pub ellipsis: String,
}Expand description
Options for Document::fit.
Fields§
§limits: LimitsLimits to fit into; defaults to Limits::TELEGRAM.
tail: Vec<Block>Blocks that are always appended at the end, e.g. a “Read original” button row. Their cost is reserved before truncating the content.
truncation_notice: Vec<Block>Blocks appended (before tail) only if the content had to be
truncated, e.g. “The article is too long, read the rest at …”.
ellipsis: StringText appended to a text block that was cut in the middle.
Trait Implementations§
Source§impl Clone for FitOptions
impl Clone for FitOptions
Source§impl Debug for FitOptions
impl Debug for FitOptions
Source§impl Default for FitOptions
impl Default for FitOptions
Source§impl PartialEq for FitOptions
impl PartialEq for FitOptions
impl StructuralPartialEq for FitOptions
Auto Trait Implementations§
impl Forget for FitOptions
impl Freeze for FitOptions
impl Move for FitOptions
impl RefUnwindSafe for FitOptions
impl Send for FitOptions
impl Sync for FitOptions
impl Unpin for FitOptions
impl UnsafeUnpin for FitOptions
impl UnwindSafe for FitOptions
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