pub struct RawCtxBindingBuilder { /* private fields */ }Expand description
Builder that emits invocation-descriptor metadata for RawCtx inputs.
Implementations§
Source§impl RawCtxBindingBuilder
impl RawCtxBindingBuilder
Sourcepub fn positional() -> Self
pub fn positional() -> Self
Convenience constructor for positional arguments.
Sourcepub fn arg(self, arg: impl Into<String>) -> Self
pub fn arg(self, arg: impl Into<String>) -> Self
Assign the argument name that should receive the decoded value.
Sourcepub fn mode(self, mode: impl Into<String>) -> Self
pub fn mode(self, mode: impl Into<String>) -> Self
Override the binding mode (keyword or positional).
Sourcepub fn decoder(self, decoder: impl Into<String>) -> Self
pub fn decoder(self, decoder: impl Into<String>) -> Self
Configure the decoder to use (utf8, json, bytes, memoryview, float64, etc.).
Sourcepub fn option(self, key: impl Into<String>, value: JsonValue) -> Self
pub fn option(self, key: impl Into<String>, value: JsonValue) -> Self
Attach decoder-specific options (stored under options).
Sourcepub fn metadata_arg(self, name: impl Into<String>) -> Self
pub fn metadata_arg(self, name: impl Into<String>) -> Self
Name the keyword argument that should receive metadata for the buffer.
Sourcepub fn raw_arg(self, name: impl Into<String>) -> Self
pub fn raw_arg(self, name: impl Into<String>) -> Self
Name the keyword argument that should receive the raw payload record.
Sourcepub fn python_loader(self, expression: impl Into<String>) -> Self
pub fn python_loader(self, expression: impl Into<String>) -> Self
Provide a Python loader expression evaluated with buffer, metadata, and payload.
Sourcepub fn default_value(self, value: JsonValue) -> Self
pub fn default_value(self, value: JsonValue) -> Self
Fallback value used when the payload is missing or the decoder returns None.
Sourcepub fn optional(self, optional: bool) -> Self
pub fn optional(self, optional: bool) -> Self
Mark the binding optional (missing payload becomes None instead of error).
Sourcepub fn table(self, table: RawCtxTableSpec) -> Self
pub fn table(self, table: RawCtxTableSpec) -> Self
Attach a table schema describing a dict-of-columns structure that the shim should build.
Sourcepub fn build(self) -> JsonValue
pub fn build(self) -> JsonValue
Serialise the builder into descriptor metadata (serde_json::Value).
Sourcepub fn merge_into(self, metadata: &mut JsonValue)
pub fn merge_into(self, metadata: &mut JsonValue)
Merge the binding into an existing metadata object (mutating it in place).
Trait Implementations§
Source§impl Clone for RawCtxBindingBuilder
impl Clone for RawCtxBindingBuilder
Source§fn clone(&self) -> RawCtxBindingBuilder
fn clone(&self) -> RawCtxBindingBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more