pub struct ActixAdminModel {
pub primary_key: Option<String>,
pub values: HashMap<String, String>,
pub fk_values: HashMap<String, String>,
pub errors: HashMap<String, String>,
pub custom_errors: HashMap<String, String>,
pub display_name: Option<String>,
}Fields§
§primary_key: Option<String>§values: HashMap<String, String>§fk_values: HashMap<String, String>§errors: HashMap<String, String>§custom_errors: HashMap<String, String>§display_name: Option<String>Implementations§
Source§impl ActixAdminModel
impl ActixAdminModel
pub fn create_empty() -> ActixAdminModel
pub async fn create_from_payload( id: Option<i32>, 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 duplicate 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 Freeze for ActixAdminModel
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