pub struct Deferred { /* private fields */ }
Expand description
A deferred inspection, which can provide inspection results asynchronously
from a call to inspect
.
Implementations§
source§impl Deferred
impl Deferred
sourcepub fn inspect(self, obj: impl InspectMut)
pub fn inspect(self, obj: impl InspectMut)
Inspect an object as part of a deferred inspection.
sourcepub fn respond<F: FnOnce(&mut Response<'_>)>(self, f: F)
pub fn respond<F: FnOnce(&mut Response<'_>)>(self, f: F)
Responds to the deferred inspection, calling f
with a Response
.
sourcepub fn update(self) -> Result<DeferredUpdate, Self>
pub fn update(self) -> Result<DeferredUpdate, Self>
Returns an object used for handling an update request.
If this is not an update request, returns Err(self)
.
sourcepub fn external_request(&self) -> ExternalRequest<'_>
pub fn external_request(&self) -> ExternalRequest<'_>
Gets the request information for sending to a remote node via a non-mesh
communication mechanism, for use with complete_external
.
You don’t need this if you are communicating with the remote object via
mesh. In that case, just send this object to the remote object over a
mesh channel, and then use respond
or similar methods to
handle the request.
Use this when the remote object is across some other communication
boundary, such as gRPC. In that case, you will be responsible for using
inspect
on the remote node to handle the request, and to serializing
and deserializing the Node
structure across the communications
boundary.
sourcepub fn complete_external(self, node: Node, sensitivity: SensitivityLevel)
pub fn complete_external(self, node: Node, sensitivity: SensitivityLevel)
Complete the request with a Node
and a SensitivityLevel
.
See external_request
for details on how to use this.
sourcepub fn sensitivity(&self) -> SensitivityLevel
pub fn sensitivity(&self) -> SensitivityLevel
Gets the sensitivity level for this request.
Trait Implementations§
source§impl DefaultEncoding for Deferred
impl DefaultEncoding for Deferred
source§type Encoding = TableEncoder
type Encoding = TableEncoder
source§impl<'encoding> StructDecodeMetadata<'encoding, Resource> for Deferred
impl<'encoding> StructDecodeMetadata<'encoding, Resource> for Deferred
source§const DECODERS: &'static [ErasedDecoderEntry] = _
const DECODERS: &'static [ErasedDecoderEntry] = _
source§impl StructEncodeMetadata<Resource> for Deferred
impl StructEncodeMetadata<Resource> for Deferred
source§const ENCODERS: &'static [ErasedEncoderEntry] = _
const ENCODERS: &'static [ErasedEncoderEntry] = _
source§impl StructMetadata for Deferred
impl StructMetadata for Deferred
impl Downcast<Deferred> for Deferred
Auto Trait Implementations§
impl Freeze for Deferred
impl !RefUnwindSafe for Deferred
impl Send for Deferred
impl Sync for Deferred
impl Unpin for Deferred
impl !UnwindSafe for Deferred
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
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> MeshField for Twhere
T: DefaultEncoding + Any + Send + 'static,
<T as DefaultEncoding>::Encoding: FieldEncode<T, Resource> + for<'a> FieldDecode<'a, T, Resource> + Send + Sync,
impl<T> MeshField for Twhere
T: DefaultEncoding + Any + Send + 'static,
<T as DefaultEncoding>::Encoding: FieldEncode<T, Resource> + for<'a> FieldDecode<'a, T, Resource> + Send + Sync,
type Encoding = <T as DefaultEncoding>::Encoding
source§impl<T> MeshPayload for Twhere
T: DefaultEncoding + Any + Send + 'static,
<T as DefaultEncoding>::Encoding: MessageEncode<T, Resource> + for<'a> MessageDecode<'a, T, Resource> + FieldEncode<T, Resource> + for<'a> FieldDecode<'a, T, Resource> + Send + Sync,
impl<T> MeshPayload for Twhere
T: DefaultEncoding + Any + Send + 'static,
<T as DefaultEncoding>::Encoding: MessageEncode<T, Resource> + for<'a> MessageDecode<'a, T, Resource> + FieldEncode<T, Resource> + for<'a> FieldDecode<'a, T, Resource> + Send + Sync,
type Encoding = <T as DefaultEncoding>::Encoding
source§impl<T> SerializeMessage for Twhere
T: MeshPayload,
impl<T> SerializeMessage for Twhere
T: MeshPayload,
source§fn compute_message_size(&mut self, sizer: MessageSizer<'_>)
fn compute_message_size(&mut self, sizer: MessageSizer<'_>)
MessageEncode::compute_message_size
.source§fn write_message(self, writer: MessageWriter<'_, '_, Resource>)
fn write_message(self, writer: MessageWriter<'_, '_, Resource>)
MessageEncode::write_message
.