Trait DocumentCustody
pub trait DocumentCustody:
Send
+ Sync
+ Debug {
// Required methods
fn check(
&self,
route: &RouteSpec,
mutation: &DocumentMutation,
) -> Result<(), String>;
fn retained_bytes(&self) -> Option<usize>;
}Expand description
Host-local original contributor custody a document change carries to the
transport, never serialized on the wire. The toolkit’s invocation scope
mints it (ui::invocation_scope::DocumentAuthorization); the transport
checks it against the change it is about to sign.
Required Methods§
fn check(
&self,
route: &RouteSpec,
mutation: &DocumentMutation,
) -> Result<(), String>
fn check( &self, route: &RouteSpec, mutation: &DocumentMutation, ) -> Result<(), String>
Whether the change’s body and its current contributors are bound to
route.
fn retained_bytes(&self) -> Option<usize>
fn retained_bytes(&self) -> Option<usize>
The bytes the custody holds while its change waits in the transport’s
queue, counted against the queue’s budget; None when they overflow.