pub struct RpcDefinition<Input, Output> { /* private fields */ }Expand description
Adds execution options to a typed Rpc before handler binding.
Definitions are created implicitly from Rpc or explicitly through Rpc::timeout and
Rpc::lock. Multiple locks are acquired together for the invocation.
Implementations§
Source§impl<Input, Output> RpcDefinition<Input, Output>
impl<Input, Output> RpcDefinition<Input, Output>
Sourcepub fn timeout(self, timeout: Duration) -> Self
pub fn timeout(self, timeout: Duration) -> Self
Sets the maximum duration of one RPC handler attempt.
Sourcepub fn lock(self, lock: AttributeLock) -> Self
pub fn lock(self, lock: AttributeLock) -> Self
Adds an Attribute or Attribute-map instance lock.
Sourcepub fn is_transactional(self) -> Self
pub fn is_transactional(self) -> Self
Requests transactional reads and writes even when no Attribute lock is configured.
Sourcepub fn load_attribute_map<T>(self, attribute_map: &AttributeMap<T>) -> Self
pub fn load_attribute_map<T>(self, attribute_map: &AttributeMap<T>) -> Self
Loads every current instance of one AttributeMap into the invocation snapshot.
Sourcepub fn load_attribute_map_instance(self, load: AttributeMapLoad) -> Self
pub fn load_attribute_map_instance(self, load: AttributeMapLoad) -> Self
Loads one AttributeMap instance into the invocation snapshot.
Sourcepub fn load_channel<T>(self, channel: &Channel<T>) -> Self
pub fn load_channel<T>(self, channel: &Channel<T>) -> Self
Adds one singleton Channel’s pending messages to the invocation snapshot.
Sourcepub fn load_channel_map<T>(self, channel_map: &ChannelMap<T>) -> Self
pub fn load_channel_map<T>(self, channel_map: &ChannelMap<T>) -> Self
Loads every current instance of one ChannelMap into the invocation snapshot.
Sourcepub fn load_channel_map_instance(self, load: ChannelMapLoad) -> Self
pub fn load_channel_map_instance(self, load: ChannelMapLoad) -> Self
Loads one ChannelMap instance into the invocation snapshot.
Trait Implementations§
Auto Trait Implementations§
impl<Input, Output> Forget for RpcDefinition<Input, Output>
impl<Input, Output> Freeze for RpcDefinition<Input, Output>
impl<Input, Output> RefUnwindSafe for RpcDefinition<Input, Output>where
Rpc<Input, Output>: RefUnwindSafe,
impl<Input, Output> Send for RpcDefinition<Input, Output>
impl<Input, Output> Sync for RpcDefinition<Input, Output>
impl<Input, Output> Unpin for RpcDefinition<Input, Output>
impl<Input, Output> UnsafeUnpin for RpcDefinition<Input, Output>where
Rpc<Input, Output>: UnsafeUnpin,
impl<Input, Output> UnwindSafe for RpcDefinition<Input, Output>where
Rpc<Input, Output>: 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
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