pub struct Observers { /* private fields */ }Expand description
Handle that can be used to inform the server when changes are detected.
Implementations§
Source§impl Observers
impl Observers
pub fn relative_path(&self) -> String
pub async fn stay_active(&self)
Sourcepub async fn notify_change(&self)
pub async fn notify_change(&self)
Inform the server that a change to the underlying resource has potentially occurred. The
server responds by re-executing synthetic Get or Fetch requests roughly matching
the original client request, then delivering the results to the peer. Note that
spurious changes will be delivered if this method is spammed so callers must take care
to ensure it is only invoked when a genuine change is expected.
Note that a sequence number will be generated for you if one is omitted
from response in the re-executed request. If you wish to provide your own,
simply set the observe value in the response with response.message.set_observe_value(...).
Be sure that if you do this, you are taking care that the sequence number does not
run backwards within 256 seconds as per:
RFC 7641, section 4.4