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 moresource§impl Debug for ActixAdminModel
impl Debug for ActixAdminModel
Auto Trait Implementations§
impl RefUnwindSafe for ActixAdminModel
impl Send for ActixAdminModel
impl Sync for ActixAdminModel
impl Unpin for ActixAdminModel
impl UnwindSafe for ActixAdminModel
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more