pub enum SwapStrategy {
This,
Children,
BeforeBegin,
AfterBegin,
BeforeEnd,
AfterEnd,
Delete,
None,
}Expand description
Strategy for how to swap or insert content in the DOM.
Based on htmx swap strategies, controls where new content is placed relative to the target element.
Variants§
This
Replace the target element itself. This is the default.
Children
Replace the children of the target element.
BeforeBegin
Insert before the target element (as a sibling).
AfterBegin
Insert as the first child of the target element.
BeforeEnd
Insert as the last child of the target element.
AfterEnd
Insert after the target element (as a sibling).
Delete
Delete the target element.
None
Do not swap any content.
Trait Implementations§
Source§impl Arbitrary for SwapStrategy
impl Arbitrary for SwapStrategy
Source§type Parameters = ()
type Parameters = ()
The type of parameters that
arbitrary_with accepts for configuration
of the generated Strategy. Parameters must implement Default.Source§type Strategy = BoxedStrategy<SwapStrategy>
type Strategy = BoxedStrategy<SwapStrategy>
The type of
Strategy used to generate values of type Self.Source§fn arbitrary_with(
args_shared: <Self as Arbitrary>::Parameters,
) -> Self::Strategy
fn arbitrary_with( args_shared: <Self as Arbitrary>::Parameters, ) -> Self::Strategy
Source§impl Clone for SwapStrategy
impl Clone for SwapStrategy
Source§fn clone(&self) -> SwapStrategy
fn clone(&self) -> SwapStrategy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SwapStrategy
impl Debug for SwapStrategy
Source§impl Default for SwapStrategy
impl Default for SwapStrategy
Source§fn default() -> SwapStrategy
fn default() -> SwapStrategy
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SwapStrategy
impl<'de> Deserialize<'de> for SwapStrategy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for SwapStrategy
impl Display for SwapStrategy
Source§impl PartialEq for SwapStrategy
impl PartialEq for SwapStrategy
Source§fn eq(&self, other: &SwapStrategy) -> bool
fn eq(&self, other: &SwapStrategy) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SwapStrategy
impl Serialize for SwapStrategy
impl Eq for SwapStrategy
impl StructuralPartialEq for SwapStrategy
Auto Trait Implementations§
impl Freeze for SwapStrategy
impl RefUnwindSafe for SwapStrategy
impl Send for SwapStrategy
impl Sync for SwapStrategy
impl Unpin for SwapStrategy
impl UnsafeUnpin for SwapStrategy
impl UnwindSafe for SwapStrategy
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