pub enum OutputData {
    Delete((bool, String, i64)),
    UpdatePassword((bool, String)),
}
Expand description

Output data for delete(), update_password(), delete_many(), delete_one, drop() methods.

Variants

Delete((bool, String, i64))

UpdatePassword((bool, String))

Implementations

Get validation status (boolean).

Example:
let mut model_name = ModelName::new()?;

let output_data = model_name.delete()?;
// or
let output_data = model_name.update_password()?;

assert!(output_data.is_valid());

Description of the error if the document was not deleted or the password was not updated. (Main use for admin panel.)

Example:
let mut model_name = ModelName::new()?;

let output_data = model_name.delete()?;
// or
let output_data = model_name.update_password()?;

if output_data.is_valid() {
    println!("{}", output_data.err_msg());
}

Printing errors to the console ( for development ).

Example:
let mut model_name = ModelName::new()?;

let output_data = model_name.delete()?;
// or
let output_data = model_name.update_password()?;

if !output_data.is_valid() {
    output_data.print_err();
}

Get deleted count.

Trait Implementations

Formats the value using the given formatter. 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

Returns the argument unchanged.

Calls U::from(self).

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

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.