pub enum ArgOr<V> {
Arg(usize),
Value(V),
}Expand description
Matches either an extracted bind-parameter placeholder (Expr::Arg, emitted
by SQL drivers after parameter extraction) at a specific position, or an
inline Expr::Value matching the contained pattern (emitted by non-SQL
drivers like DynamoDB).
Use this when a single assertion needs to cover both representations:
ⓘ
let val = if test.capability().sql {
ArgOr::Arg(0)
} else {
ArgOr::Value(1i64)
};
assert_struct!(op, ..., rows: [=~ (Any, Any, val)]);Variants§
Arg(usize)
Matches Expr::Arg(_) whose position equals the given index.
Value(V)
Matches Expr::Value(_) using the inner pattern via Like<V>.
Trait Implementations§
Auto Trait Implementations§
impl<V> Freeze for ArgOr<V>where
V: Freeze,
impl<V> RefUnwindSafe for ArgOr<V>where
V: RefUnwindSafe,
impl<V> Send for ArgOr<V>where
V: Send,
impl<V> Sync for ArgOr<V>where
V: Sync,
impl<V> Unpin for ArgOr<V>where
V: Unpin,
impl<V> UnsafeUnpin for ArgOr<V>where
V: UnsafeUnpin,
impl<V> UnwindSafe for ArgOr<V>where
V: UnwindSafe,
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