[−][src]Struct oration::data::FormInput
pub struct FormInput { pub comment: String, pub parent: Option<i32>, pub name: Option<String>, pub email: Option<String>, pub url: Option<String>, pub title: String, pub path: String, }
Incoming data from the web based form for a new comment.
Fields
comment: String
Comment from textarea.
parent: Option<i32>
Parent comment if any.
name: Option<String>
Optional name.
email: Option<String>
Optional email.
url: Option<String>
Optional website.
title: String
Title of post.
path: String
Path of post.
Methods
impl FormInput
[src]
impl FormInput
pub fn sender_name(&self) -> String
[src]
pub fn sender_name(&self) -> String
Yields the senders name with a default if is empty.
pub fn sender_email(&self) -> String
[src]
pub fn sender_email(&self) -> String
Yields the senders email address with a default if is empty.
Trait Implementations
impl<'rocket> FromForm<'rocket> for FormInput
[src]
impl<'rocket> FromForm<'rocket> for FormInput
fn from_form(
it: &mut FormItems<'rocket>,
strict: bool
) -> Result<FormInput, Error>
[src]
fn from_form(
it: &mut FormItems<'rocket>,
strict: bool
) -> Result<FormInput, Error>
Parses an instance of Self
from the iterator of form items it
. Read more
type Error = Error
The associated error to be returned when parsing fails.
impl Debug for FormInput
[src]
impl Debug for FormInput