pub struct RawCtxPublishBuilder { /* private fields */ }Expand description
Builder that emits descriptor metadata for RawCtx outputs / shared buffers.
Implementations§
Source§impl RawCtxPublishBuilder
impl RawCtxPublishBuilder
Sourcepub fn new(id: impl Into<String>) -> Self
pub fn new(id: impl Into<String>) -> Self
Create a publish builder for the provided shared-buffer identifier.
Sourcepub fn mode(self, mode: impl Into<String>) -> Self
pub fn mode(self, mode: impl Into<String>) -> Self
Override the publish mode (defaults to publish-buffer).
Sourcepub fn transform(self, transform: impl Into<String>) -> Self
pub fn transform(self, transform: impl Into<String>) -> Self
Select the transform applied to the return value before publishing.
Sourcepub fn metadata(self, metadata: JsonValue) -> Self
pub fn metadata(self, metadata: JsonValue) -> Self
Attach metadata emitted alongside the shared buffer.
Sourcepub fn python_transform(self, expression: impl Into<String>) -> Self
pub fn python_transform(self, expression: impl Into<String>) -> Self
Provide a Python expression executed to transform the result (result in scope).
Sourcepub fn return_behavior(self, behaviour: impl Into<String>) -> Self
pub fn return_behavior(self, behaviour: impl Into<String>) -> Self
Control what the wrapper returns (none, original, buffer).
Sourcepub fn when_none(self, mode: impl Into<String>) -> Self
pub fn when_none(self, mode: impl Into<String>) -> Self
Specify behaviour when the user returns None (skip, error, publish-empty, propagate).
Sourcepub fn encoding(self, encoding: impl Into<String>) -> Self
pub fn encoding(self, encoding: impl Into<String>) -> Self
Provide an encoding hint when using the UTF-8 transform.
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 publish metadata into an existing descriptor metadata object.
Trait Implementations§
Source§impl Clone for RawCtxPublishBuilder
impl Clone for RawCtxPublishBuilder
Source§fn clone(&self) -> RawCtxPublishBuilder
fn clone(&self) -> RawCtxPublishBuilder
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 RawCtxPublishBuilder
impl RefUnwindSafe for RawCtxPublishBuilder
impl Send for RawCtxPublishBuilder
impl Sync for RawCtxPublishBuilder
impl Unpin for RawCtxPublishBuilder
impl UnwindSafe for RawCtxPublishBuilder
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