Struct actix_admin::model::ActixAdminModel
source · pub struct ActixAdminModel {
pub primary_key: Option<String>,
pub values: HashMap<String, String>,
pub errors: HashMap<String, String>,
pub custom_errors: HashMap<String, String>,
}Fields§
§primary_key: Option<String>§values: HashMap<String, String>§errors: HashMap<String, String>§custom_errors: HashMap<String, String>Implementations§
source§impl ActixAdminModel
impl ActixAdminModel
pub fn create_empty() -> ActixAdminModel
pub async fn create_from_payload( payload: Multipart, file_upload_folder: &str ) -> Result<ActixAdminModel, MultipartError>
pub fn get_value<T: FromStr>( &self, key: &str, is_option_or_string: bool, is_allowed_to_be_empty: bool ) -> Result<Option<T>, String>
pub fn get_datetime( &self, key: &str, is_option_or_string: bool, is_allowed_to_be_empty: bool ) -> Result<Option<NaiveDateTime>, String>
pub fn get_date( &self, key: &str, is_option_or_string: bool, is_allowed_to_be_empty: bool ) -> Result<Option<NaiveDate>, String>
pub fn get_bool( &self, key: &str, is_option_or_string: bool, is_allowed_to_be_empty: bool ) -> Result<Option<bool>, String>
pub fn has_errors(&self) -> bool
Trait Implementations§
source§impl Clone for ActixAdminModel
impl Clone for ActixAdminModel
source§fn clone(&self) -> ActixAdminModel
fn clone(&self) -> ActixAdminModel
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more