#[non_exhaustive]pub struct Reply { /* private fields */ }Expand description
An answer received from a Queryable.
The Reply contains the result of the request to a Queryable by
Session::get or Querier::get.
It may be either a successful result with a Sample or an error with a ReplyError.
The method Reply::result is provided to access the result.
Implementations§
Source§impl Reply
impl Reply
Sourcepub fn result(&self) -> Result<&Sample, &ReplyError>
pub fn result(&self) -> Result<&Sample, &ReplyError>
Gets a borrowed result of this Reply. Use Reply::into_result to take ownership of the result.
Sourcepub fn result_mut(&mut self) -> Result<&mut Sample, &mut ReplyError>
pub fn result_mut(&mut self) -> Result<&mut Sample, &mut ReplyError>
Gets a mutable borrowed result of this Reply. Use Reply::into_result to take ownership of the result.
Sourcepub fn into_result(self) -> Result<Sample, ReplyError>
pub fn into_result(self) -> Result<Sample, ReplyError>
Converts this Reply into its result. Use Reply::result if you don’t want to take ownership.
Sourcepub fn replier_id(&self) -> Option<EntityGlobalId>
Available on crate feature unstable only.
pub fn replier_id(&self) -> Option<EntityGlobalId>
unstable only.Gets the ID of the zenoh instance that answered this reply.
This API has been marked as unstable: it works as advertised, but it may be changed in a future release.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Reply
impl !RefUnwindSafe for Reply
impl Send for Reply
impl Sync for Reply
impl Unpin for Reply
impl !UnwindSafe for Reply
Blanket Implementations§
Source§impl<Source> AccessAs for Source
impl<Source> AccessAs for Source
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more