pub struct Response { /* private fields */ }Expand description
A response to Request.
Contains the Self::hashes for all the resources the sender wants.
§Eq implementation
If the receiver is the same, this is considered equal. Only one of these conversations should be communicated at once, therefore the filter doesn’t matter.
Implementations§
source§impl Response
impl Response
sourcepub fn hashes(&self) -> &BTreeMap<String, ResponseHash>
pub fn hashes(&self) -> &BTreeMap<String, ResponseHash>
Get a reference to the response’s hashes.
sourcepub fn different_cutoff(&self) -> bool
pub fn different_cutoff(&self) -> bool
Tests if the requested cutoff (in time) is the same as the one reponded with.
While the pier is handling the Request we sent, we can process our own response, to
be ready once we get this response. This checks if the remote was forced to change the
cutoff. If the returned value is true, we cannot rely on the hash check response we created
while the pier processed it.
sourcepub fn unwinder<'a>(&self, manager: &'a Manager) -> ResponseHashRewinder<'a>
pub fn unwinder<'a>(&self, manager: &'a Manager) -> ResponseHashRewinder<'a>
Get an unwinder to unwind the resources you will add to the map before calling
crate::Manager::apply_hash_check_reply.
The returned item should be reused for each resource.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Response
impl<'de> Deserialize<'de> for Response
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Response
Auto Trait Implementations§
impl Freeze for Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnwindSafe for Response
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)