rss

Struct TextInput

Source
pub struct TextInput {
    pub title: String,
    pub description: String,
    pub name: String,
    pub link: String,
}
Expand description

Represents a text input for an RSS channel.

Fields§

§title: String

The label of the Submit button for the text input.

§description: String

A description of the text input.

§name: String

The name of the text object.

§link: String

The URL of the CGI script that processes the text input request.

Implementations§

Source§

impl TextInput

Source

pub fn title(&self) -> &str

Return the title for this text field.

§Examples
use rss::TextInput;

let mut text_input = TextInput::default();
text_input.set_title("Input Title");
assert_eq!(text_input.title(), "Input Title");
Source

pub fn set_title<V>(&mut self, title: V)
where V: Into<String>,

Set the title for this text field.

§Examples
use rss::TextInput;

let mut text_input = TextInput::default();
text_input.set_title("Input Title");
Source

pub fn description(&self) -> &str

Return the description of this text field.

§Examples
use rss::TextInput;

let mut text_input = TextInput::default();
text_input.set_description("Input description");
assert_eq!(text_input.description(), "Input description");
Source

pub fn set_description<V>(&mut self, description: V)
where V: Into<String>,

Set the description of this text field.

§Examples
use rss::TextInput;

let mut text_input = TextInput::default();
text_input.set_description("Input description");
Source

pub fn name(&self) -> &str

Return the name of the text object in this input.

§Examples
use rss::TextInput;

let mut text_input = TextInput::default();
text_input.set_name("Input name");
assert_eq!(text_input.name(), "Input name");
Source

pub fn set_name<V>(&mut self, name: V)
where V: Into<String>,

Set the name of the text object in this input.

§Examples
use rss::TextInput;

let mut text_input = TextInput::default();
text_input.set_name("Input name");;

Return the URL of the GCI script that processes the text input request.

§Examples
use rss::TextInput;

let mut text_input = TextInput::default();
text_input.set_link("http://example.com/submit");
assert_eq!(text_input.link(), "http://example.com/submit");

Set the URL of the GCI script that processes the text input request.

§Examples
use rss::TextInput;

let mut text_input = TextInput::default();
text_input.set_link("http://example.com/submit");
Source§

impl TextInput

Source

pub fn from_xml<R: BufRead>( reader: &mut Reader<R>, _: Attributes<'_>, ) -> Result<Self, Error>

Builds a TextInput from source XML

Trait Implementations§

Source§

impl Clone for TextInput

Source§

fn clone(&self) -> TextInput

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TextInput

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for TextInput

Source§

fn default() -> TextInput

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for TextInput

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for TextInput

Source§

fn eq(&self, other: &TextInput) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for TextInput

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Validate for TextInput

Source§

fn validate(&self) -> Result<(), ValidationError>

Validate the data against the RSS specification.
Source§

impl StructuralPartialEq for TextInput

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T