pub struct Entity {
pub kind: EntityKind,
pub offset: usize,
pub length: usize,
}Expand description
A styled span of a message, positioned in UTF-16 code units.
This is Telegram’s canonical representation of formatting. Sending entities
directly — rather than a parse_mode string — means there is no markup
embedded in the text, and therefore nothing which ever needs escaping.
Fields§
§kind: EntityKindWhat kind of formatting this span carries.
offset: usizeOffset of the span’s start, in UTF-16 code units.
length: usizeLength of the span, in UTF-16 code units.
Implementations§
Trait Implementations§
impl Eq for Entity
impl StructuralPartialEq for Entity
Auto Trait Implementations§
impl Freeze for Entity
impl RefUnwindSafe for Entity
impl Send for Entity
impl Sync for Entity
impl Unpin for Entity
impl UnsafeUnpin for Entity
impl UnwindSafe for Entity
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