pub struct NestedAttributesConfig {
pub association: String,
pub allow_destroy: bool,
pub limit: Option<usize>,
pub reject_if: Option<RejectIf>,
}Expand description
Metadata describing accepted nested attributes for an association.
Fields§
§association: StringThe association name.
allow_destroy: boolWhether _destroy marks nested records for deletion.
limit: Option<usize>Maximum number of records allowed in one assignment.
reject_if: Option<RejectIf>Optional predicate that rejects nested payloads.
Implementations§
Source§impl NestedAttributesConfig
impl NestedAttributesConfig
Sourcepub fn allow_destroy(self) -> Self
pub fn allow_destroy(self) -> Self
Enables _destroy handling.
Trait Implementations§
Source§impl Clone for NestedAttributesConfig
impl Clone for NestedAttributesConfig
Source§fn clone(&self) -> NestedAttributesConfig
fn clone(&self) -> NestedAttributesConfig
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 moreAuto Trait Implementations§
impl Freeze for NestedAttributesConfig
impl RefUnwindSafe for NestedAttributesConfig
impl Send for NestedAttributesConfig
impl Sync for NestedAttributesConfig
impl Unpin for NestedAttributesConfig
impl UnsafeUnpin for NestedAttributesConfig
impl UnwindSafe for NestedAttributesConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more