Struct agde::hash_check::Response
source · 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.