pub enum Binder {
Positional {
field: String,
slots: Vec<BinderSlot>,
},
Named {
field: String,
slots: BTreeMap<String, BinderSlot>,
},
Single {
field: String,
slot: BinderSlot,
},
}Expand description
One adapter-declared binding shape for one op-template field.
Three variants cover the common protocol shapes. The field
names the op-template field this binder describes — surfaced
in error diagnostics so the operator can locate the slot
quickly.
Variants§
Positional
Positional binding (slot index = position in vec).
Example: a CQL prepared statement with three ?
placeholders → three positional slots. The slot at index 0
binds to the first ?, etc.
Fields
slots: Vec<BinderSlot>One slot per placeholder, in position order.
Named
Named binding (slot key = parameter name).
Example: a CQL prepared statement with :id / :val
named parameters → two named slots keyed by id / val.
BTreeMap for deterministic diagnostic ordering.
Fields
slots: BTreeMap<String, BinderSlot>One slot per named parameter.
Single
Single-value binding (the whole field IS one typed value).
Example: an HTTP body bound as one JSON object, an MQTT payload bound as Bytes. The slot supplies the field’s entire value with the lvalue type declared by the protocol.
Fields
slot: BinderSlotThe slot supplying the field’s whole value.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Forget for Binder
impl Freeze for Binderwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<BinderSlot>: Freeze,
*const LeafNode<String, BinderSlot> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, BinderSlot)>>: Freeze,
impl Move for Binder
impl RefUnwindSafe for Binder
impl Send for Binderwhere
RawVecInner: Send,
NodeRef<Owned, String, BinderSlot, LeafOrInternal>: Send,
BoxRaw<(String, BinderSlot)>: Send,
impl Sync for Binderwhere
RawVecInner: Sync,
NodeRef<Owned, String, BinderSlot, LeafOrInternal>: Sync,
BoxRaw<(String, BinderSlot)>: Sync,
impl Unpin for Binder
impl UnsafeUnpin for Binderwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<BinderSlot>: UnsafeUnpin,
*const LeafNode<String, BinderSlot> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, BinderSlot)>>: UnsafeUnpin,
impl UnwindSafe for Binder
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
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> ⓘ
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