pub struct ModelFormSet<T: FormModel> { /* private fields */ }Expand description
ModelFormSet for managing multiple model instances
This is similar to the base FormSet but specifically designed for model instances.
Implementations§
Source§impl<T: FormModel> ModelFormSet<T>
impl<T: FormModel> ModelFormSet<T>
Sourcepub fn with_extra(self, extra: usize) -> Self
pub fn with_extra(self, extra: usize) -> Self
Set extra forms count
Sourcepub fn with_can_delete(self, can_delete: bool) -> Self
pub fn with_can_delete(self, can_delete: bool) -> Self
Enable deletion
Sourcepub fn with_can_order(self, can_order: bool) -> Self
pub fn with_can_order(self, can_order: bool) -> Self
Enable ordering
Sourcepub fn with_max_num(self, max_num: Option<usize>) -> Self
pub fn with_max_num(self, max_num: Option<usize>) -> Self
Set maximum number of forms
Sourcepub fn with_min_num(self, min_num: usize) -> Self
pub fn with_min_num(self, min_num: usize) -> Self
Set minimum number of forms
Auto Trait Implementations§
impl<T> Freeze for ModelFormSet<T>
impl<T> !RefUnwindSafe for ModelFormSet<T>
impl<T> Send for ModelFormSet<T>
impl<T> Sync for ModelFormSet<T>
impl<T> Unpin for ModelFormSet<T>where
T: Unpin,
impl<T> UnsafeUnpin for ModelFormSet<T>
impl<T> !UnwindSafe for ModelFormSet<T>
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