Enum mango_orm::forms::output_data::OutputDataForm[][src]

pub enum OutputDataForm {
    CheckModel((bool, Vec<String>, HashMap<String, Widget>, Document)),
    Save((bool, Vec<String>, HashMap<String, Widget>, String)),
    Delete((bool, String)),
}
Expand description

Output data type

Variants

CheckModel((bool, Vec<String>, HashMap<String, Widget>, Document))

Tuple Fields of CheckModel

0: (bool, Vec<String>, HashMap<String, Widget>, Document)

Tuple Fields of Save

0: (bool, Vec<String>, HashMap<String, Widget>, String)
Delete((bool, String))

Tuple Fields of Delete

0: (bool, String)

Implementations

Example:

let output_data = UserProfile.save()?;
println!("{}", output_data.hash());

Get MongoDB ID from hash-line

Example:

let output_data = UserProfile.save()?;
println!("{:?}", output_data.id()?);

Get Map of Widgets ( Wig - Widgets )

Example:

let output_data = UserProfile.save()?;
println!("{:?}", output_data.wig());

Get Json-line

Example:

let output_data = UserProfile.save()?;
println!("{}", output_data.json()?);

Json-line for admin panel. ( converts a widget map to a list, in the order of the Model fields )

Example:

let output_data = UserProfile.save()?;
println!("{}", output_data.json_for_admin()?);

Get validation status (boolean)

Example:

let output_data = UserProfile {...}
let result = output_data.check()?;
assert!(result.is_valid());

Get Document

Example:

let output_data = UserProfile.save()?;
println!("{:?}", output_data.doc());

A description of the error if the document was not deleted. (Main use for admin panel.)

Example:

let output_data = UserProfile.delete()?;
println!("{}", output_data.err_msg());

Trait Implementations

Formats the value using the given formatter. Read more

Get Html-line

Example:

let output_data = UserProfile.save()?;
println!("{}", output_data.html());

Rendering HTML-controls code for Form. ( If necessary, customize the code generation yourself using html and css from Bootstrap, Material Design, etc. ) Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.