Trait somedoc::model::HasInnerContent[][src]

pub trait HasInnerContent<T> {
    fn inner(&self) -> &Vec<T>;
fn into_inner(self) -> Vec<T>;
fn inner_mut(&mut self) -> &mut Vec<T>;
fn add_content(&mut self, content: T) -> Result<()>; fn has_inner(&self) -> bool { ... } }

This trait should be implemented by any type, whether block or inline, that includes. InlineContent. This allows for common treatment of such types in writers and similar use cases.

Required methods

fn inner(&self) -> &Vec<T>[src]

Return a reference to the inner value.

fn into_inner(self) -> Vec<T>[src]

Return the inner value, consuming self.

fn inner_mut(&mut self) -> &mut Vec<T>[src]

Return a mutable reference to the inner list of content.

fn add_content(&mut self, content: T) -> Result<()>[src]

Add content to the inner list of content. If there is some consistency condition that would be broken by this addition an error will be returned.

Loading content...

Provided methods

fn has_inner(&self) -> bool[src]

Returns true if the inner list of content is not empty, else false.

Loading content...

Implementors

impl HasInnerContent<BlockContent> for Quote[src]

impl HasInnerContent<BlockContent> for Document[src]

impl HasInnerContent<InlineContent> for Cell[src]

impl HasInnerContent<InlineContent> for DefinitionPart[src]

impl HasInnerContent<InlineContent> for Heading[src]

impl HasInnerContent<InlineContent> for Item[src]

impl HasInnerContent<InlineContent> for Paragraph[src]

impl HasInnerContent<InlineContent> for Span[src]

Loading content...