pub struct RpcInvokeOptions { /* private fields */ }Expand description
Adds runtime-selected map instances to one RPC invocation.
Dex unions these selections with the RPC definition’s fixed locks and loads, then sorts and deduplicates their physical names. Locks and loads are independent. Read-modify-write handlers must add the same AttributeMap instance through both builder methods.
§Examples
use dex_sdk::{AttributeMap, RpcInvokeOptions};
let profiles = AttributeMap::<String>::new("profiles");
let options = RpcInvokeOptions::new()
.lock_attribute_map_instance(profiles.lock("partition-007"))
.load_attribute_map_instance(profiles.load("partition-007"));Implementations§
Source§impl RpcInvokeOptions
impl RpcInvokeOptions
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates empty invocation options that preserve the RPC definition’s behavior.
Sourcepub fn lock_attribute_map_instance(self, lock: AttributeLock) -> Self
pub fn lock_attribute_map_instance(self, lock: AttributeLock) -> Self
Adds one AttributeMap instance lock for this invocation.
This does not load the instance into the handler snapshot.
Sourcepub fn load_attribute_map_instance(self, load: AttributeMapLoad) -> Self
pub fn load_attribute_map_instance(self, load: AttributeMapLoad) -> Self
Adds one exact AttributeMap instance to the handler snapshot.
Sourcepub fn load_channel_map_instance(self, load: ChannelMapLoad) -> Self
pub fn load_channel_map_instance(self, load: ChannelMapLoad) -> Self
Adds one exact ChannelMap instance’s pending messages to the handler snapshot.
Trait Implementations§
Source§impl Clone for RpcInvokeOptions
impl Clone for RpcInvokeOptions
Source§impl Debug for RpcInvokeOptions
impl Debug for RpcInvokeOptions
Auto Trait Implementations§
impl Freeze for RpcInvokeOptions
impl RefUnwindSafe for RpcInvokeOptions
impl Send for RpcInvokeOptions
impl Sync for RpcInvokeOptions
impl Unpin for RpcInvokeOptions
impl UnsafeUnpin for RpcInvokeOptions
impl UnwindSafe for RpcInvokeOptions
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
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request