pub struct InlineBuilder { /* private fields */ }Expand description
Builds the contents of a block-level entity, such as a blockquote.
This deliberately exposes only inline formatting. Telegram documents that
pre cannot be nested inside other entities, and nesting a blockquote in a
blockquote is meaningless, so neither is reachable here — the restriction is
enforced by the type system rather than discovered at runtime.
Implementations§
Source§impl InlineBuilder
impl InlineBuilder
Sourcepub fn styled(self, text: impl AsRef<str>, style: Style) -> Self
pub fn styled(self, text: impl AsRef<str>, style: Style) -> Self
Appends text carrying an arbitrary combination of inline styles.
Sourcepub fn strikethrough(self, text: impl AsRef<str>) -> Self
pub fn strikethrough(self, text: impl AsRef<str>) -> Self
Appends struck-through text.
Sourcepub fn link(self, text: impl AsRef<str>, url: impl Into<String>) -> Self
pub fn link(self, text: impl AsRef<str>, url: impl Into<String>) -> Self
Appends text which links to a URL.
Trait Implementations§
Source§impl Clone for InlineBuilder
impl Clone for InlineBuilder
Source§fn clone(&self) -> InlineBuilder
fn clone(&self) -> InlineBuilder
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 moreSource§impl Debug for InlineBuilder
impl Debug for InlineBuilder
Source§impl Default for InlineBuilder
impl Default for InlineBuilder
Source§fn default() -> InlineBuilder
fn default() -> InlineBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for InlineBuilder
impl RefUnwindSafe for InlineBuilder
impl Send for InlineBuilder
impl Sync for InlineBuilder
impl Unpin for InlineBuilder
impl UnsafeUnpin for InlineBuilder
impl UnwindSafe for InlineBuilder
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