Struct feed::TextInputBuilder
[−]
[src]
pub struct TextInputBuilder { /* fields omitted */ }
This TextInputBuilder
struct creates the TextInput
.
Methods
impl TextInputBuilder
[src]
fn new() -> TextInputBuilder
Construct a new TextInputBuilder
and return default values.
Examples
use feed::TextInputBuilder; let text_input_builder = TextInputBuilder::new();
fn title(&mut self, title: &str) -> &mut TextInputBuilder
Set the title that exists under TextInput
.
Examples
use feed::TextInputBuilder; let mut text_input_builder = TextInputBuilder::new(); text_input_builder.title("Title");
fn description(&mut self, description: &str) -> &mut TextInputBuilder
Set the description that exists under TextInput
.
Examples
use feed::TextInputBuilder; let mut text_input_builder = TextInputBuilder::new(); text_input_builder.description("This is a test description.");
fn name(&mut self, name: &str) -> &mut TextInputBuilder
Set the name that exists under TextInput
.
Examples
use feed::TextInputBuilder; let mut text_input_builder = TextInputBuilder::new(); text_input_builder.name("Comments");
fn link(&mut self, link: &str) -> &mut TextInputBuilder
Set the link that exists under TextInput
.
Examples
use feed::TextInputBuilder; let mut text_input_builder = TextInputBuilder::new(); text_input_builder.link("http://www.example.com/feedback");
fn validate(&mut self) -> Result<&mut TextInputBuilder, String>
Validate the contents of TextInput
.
Examples
use feed::TextInputBuilder; let text_input = TextInputBuilder::new() .title("Title") .description("This is a test description.") .name("Comments") .link("http://www.example.com/feedback") .validate().unwrap() .finalize().unwrap();
fn finalize(&self) -> Result<TextInput, String>
Construct the TextInput
from the TextInputBuilder
.
Examples
use feed::TextInputBuilder; let text_input = TextInputBuilder::new() .title("Title") .description("This is a test description.") .name("Comments") .link("http://www.example.com/feedback") .finalize() .unwrap();
Trait Implementations
impl Clone for TextInputBuilder
[src]
fn clone(&self) -> TextInputBuilder
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Default for TextInputBuilder
[src]
fn default() -> TextInputBuilder
Returns the "default value" for a type. Read more