Struct cursive::views::TextContent [−][src]
pub struct TextContent { /* fields omitted */ }
Expand description
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!(view.get_content().source().contains("new"));
Implementations
Creates a new text content around the given value.
Parses the given value.
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.
Apply the given closure to the inner content, and bust the cache afterward.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for TextContent
impl Send for TextContent
impl Sync for TextContent
impl Unpin for TextContent
impl UnwindSafe for TextContent
Blanket Implementations
Mutably borrows from an owned value. Read more
Calls the given closure and return the result. Read more
Calls the given closure on self
.