pub struct Continuation {
pub branch: String,
pub version: Version,
pub resume: Resume,
pub now: Box<RawValue>,
/* private fields */
}Fields§
§branch: String§version: Version§resume: Resume§now: Box<RawValue>Later pages use this value; only the first page reads the clock.
Implementations§
Source§impl Continuation
impl Continuation
Sourcepub fn new(
branch: String,
version: Version,
resume: Resume,
now: Box<RawValue>,
binding: Binding,
) -> Result<Self, Failure>
pub fn new( branch: String, version: Version, resume: Resume, now: Box<RawValue>, binding: Binding, ) -> Result<Self, Failure>
Construct and validate a captured query continuation.
§Errors
Returns query_continuation_invalid for an invalid branch, cursor or score, or propagates an invalid binding.
Sourcepub fn encode(&self, seal: &Seal) -> Result<String, Failure>
pub fn encode(&self, seal: &Seal) -> Result<String, Failure>
The token sealed by seal: nothing in it can be read or changed by
whoever holds it.
§Errors
As Self::plain, and when the token cannot be sealed.
Sourcepub fn decode(encoded: &str, seal: &Seal) -> Result<Self, Failure>
pub fn decode(encoded: &str, seal: &Seal) -> Result<Self, Failure>
The token opened by seal, then checked as Self::from_plain.
§Errors
query_continuation_invalid for a token seal did not seal or that
was altered; then every refusal of Self::from_plain.
Sourcepub fn from_plain(bytes: &[u8]) -> Result<Self, Failure>
pub fn from_plain(bytes: &[u8]) -> Result<Self, Failure>
The token whose canonical bytes are bytes, opened and not yet checked
against a request.
§Errors
query_continuation_format for another format, and
query_continuation_invalid for bytes that are not a valid token in
their canonical form.