Trait somedoc::model::inline::HasInlineContent [−][src]
This trait is implemented by any type that contains, as content, a list of inline content instances. Implementers of this trait may be themselves either block or inline content objects.
Note that the add_
methods all return &mut Self
and so calls to these may be chained.
Provided methods
fn link(inner: HyperLink) -> Self
[src]
Create a new inline content container from the provided HyperLink
content item.
fn image(inner: Image) -> Self
[src]
Create a new inline content container from the provided Image
content item.
fn text(inner: Text) -> Self
[src]
Create a new inline content container from the provided Text
content item.
fn text_str(inner: &str) -> Self
[src]
Create a new inline content container from the provided string (into Text
) content item.
fn character(inner: Character) -> Self
[src]
Create a new inline content container from the provided Character
content item.
fn line_break() -> Self
[src]
Create a new inline content container with a line break.
fn span(span: Span) -> Self
[src]
Create a new inline content container from the provided Span
content item.
fn add_link(&mut self, inner: HyperLink) -> &mut Self
[src]
Add the provided HyperLink
to this container's inner content.
fn add_image(&mut self, inner: Image) -> &mut Self
[src]
Add the provided Image
to this container's inner content.
fn add_text(&mut self, inner: Text) -> &mut Self
[src]
Add the provided Text
to this container's inner content.
fn add_text_str(&mut self, inner: &str) -> &mut Self
[src]
Add the provided string (as Text
) to this container's inner content.
fn add_character(&mut self, inner: Character) -> &mut Self
[src]
Add the provided Character
to this container's inner content.
fn add_space(&mut self) -> &mut Self
[src]
Add a single space to this container's inner content.
fn add_non_breaking_space(&mut self) -> &mut Self
[src]
Add a single non-breaking space to this container's inner content.
fn add_line_break(&mut self) -> &mut Self
[src]
Add a LineBreak
to this container's inner content.
fn add_span(&mut self, inner: Span) -> &mut Self
[src]
Add the provided Span
to this container's inner content.
fn plain(inner: InlineContent) -> Self
[src]
Create a new inline content container as a Span
, with TextStyle::Plain
applied to the
provided content.
fn plain_str(inner: &str) -> Self
[src]
Create a new inline content container as a Span
, with TextStyle::Plain
applied to the
provided string as a Text
instance.
fn italic(inner: InlineContent) -> Self
[src]
Create a new inline content container as a Span
, with TextStyle::Italic
applied to the
provided content.
fn italic_str(inner: &str) -> Self
[src]
Create a new inline content container as a Span
, with TextStyle::Italic
applied to the
provided string as a Text
instance.
fn bold(inner: InlineContent) -> Self
[src]
Create a new inline content container as a Span
, with TextStyle::Bold
applied to the
provided content.
fn bold_str(inner: &str) -> Self
[src]
Create a new inline content container as a Span
, with TextStyle::Bold
applied to the
provided string as a Text
instance.
fn mono(inner: InlineContent) -> Self
[src]
Create a new inline content container as a Span
, with TextStyle::Mono
applied to the
provided content.
fn mono_str(inner: &str) -> Self
[src]
Create a new inline content container as a Span
, with TextStyle::Mono
applied to the
provided string as a Text
instance.
fn code(inner: InlineContent) -> Self
[src]
Create a new inline content container as a Span
, with TextStyle::Code
applied to the
provided content.
fn code_str(inner: &str) -> Self
[src]
Create a new inline content container as a Span
, with TextStyle::Code
applied to the
provided string as a Text
instance.
fn strikethrough(inner: InlineContent) -> Self
[src]
Create a new inline content container as a Span
, with TextStyle::Strikethrough
applied to the
provided content.
fn strikethrough_str(inner: &str) -> Self
[src]
Create a new inline content container as a Span
, with TextStyle::Strikethrough
applied to the
provided string as a Text
instance.
fn underline(inner: InlineContent) -> Self
[src]
Create a new inline content container as a Span
, with TextStyle::Underline
applied to the
provided content.
fn underline_str(inner: &str) -> Self
[src]
Create a new inline content container as a Span
, with TextStyle::Underline
applied to the
provided string as a Text
instance.
fn small_caps(inner: InlineContent) -> Self
[src]
Create a new inline content container as a Span
, with TextStyle::SmallCaps
applied to the
provided content.
fn small_caps_str(inner: &str) -> Self
[src]
Create a new inline content container as a Span
, with TextStyle::SmallCaps
applied to the
provided string as a Text
instance.
fn superscript(inner: InlineContent) -> Self
[src]
Create a new inline content container as a Span
, with TextStyle::Superscript
applied to the
provided content.
fn superscript_str(inner: &str) -> Self
[src]
Create a new inline content container as a Span
, with TextStyle::Superscript
applied to the
provided string as a Text
instance.
fn subscript(inner: InlineContent) -> Self
[src]
Create a new inline content container as a Span
, with TextStyle::Subscript
applied to the
provided content.
fn subscript_str(inner: &str) -> Self
[src]
Create a new inline content container as a Span
, with TextStyle::Subscript
applied to the
provided string as a Text
instance.
fn unformatted_string(&self) -> String
[src]
Return a string that is simply the Text
instances (recursively) concatenated. This removes
any style information and non-text instances such as images or links.