Struct cursive::views::TextContent[][src]

pub struct TextContent { /* fields omitted */ }

Provides access to the content of a TextView.

Cloning this object will still point to the same content.

Examples

let mut content = TextContent::new("content");
let view = TextView::new_with_content(content.clone());

// Later, possibly in a different thread
content.set_content("new content");
assert!(content.get_content().source().contains("new"));

Methods

impl TextContent
[src]

Creates a new text content around the given value.

Parses the given value.

impl TextContent
[src]

Replaces the content with the given value.

Append content to the end of a TextView.

Returns a reference to the content.

This locks the data while the returned value is alive, so don't keep it too long.

Trait Implementations

impl Clone for TextContent
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for TextContent

impl Sync for TextContent