pub enum ServiceResponse {
Show 17 variants
Entry(Entry),
Entries(Vec<Entry>),
Ids(Snapshot),
Ok,
Record(Option<Vec<u8>>),
RecordPage(RecordPage),
RecordView(Option<String>),
Token(String),
TransactionContext(TransactionContext),
CrdtValue(WireCrdtValue),
MergeState(MergeState),
InstanceMetadata(Option<InstanceMetadata>),
Error(ServiceError),
DatabaseTicket(DatabaseTicket),
TrustedLoginChallenge {
challenge: Vec<u8>,
user_uuid: String,
user_info: UserInfo,
},
TrustedLoginOk,
SessionKeyChallenge {
challenge: Vec<u8>,
},
}Expand description
Response from server to client.
Variants§
Entry(Entry)
Single entry
Entries(Vec<Entry>)
Multiple entries
Ids(Snapshot)
Multiple IDs
Ok
Success with no data
Record(Option<Vec<u8>>)
One optional opaque record.
RecordPage(RecordPage)
One bounded, ordered record page.
RecordView(Option<String>)
View onto one published record set.
Token(String)
Capability for one private build.
TransactionContext(TransactionContext)
Transaction-build context (response to DatabaseOp::BeginTransaction).
CrdtValue(WireCrdtValue)
Materialized CRDT store state (response to DatabaseOp::GetStoreState).
MergeState(MergeState)
Merge state: lowest common ancestor + path to tips (response to
DatabaseOp::ComputeMergeState).
InstanceMetadata(Option<InstanceMetadata>)
Optional instance metadata
Error(ServiceError)
Error response
DatabaseTicket(DatabaseTicket)
Point-in-time locator for one authorized database.
TrustedLoginChallenge
Challenge bytes returned in response to TrustedLoginUser, plus the
user’s full record so the client can derive the password→key, decrypt
the root signing key locally, sign the challenge in a single
round-trip, and then build the User session from data the daemon
already returned — no second wire read of _users is required.
user_info.credentials carries the (encrypted) root private key, its
KeyStorage envelope (algorithm/ciphertext/nonce for password-protected
users, raw PrivateKey for passwordless users), and the Argon2id salt
when password-protected. The non-credential fields (user_database_id,
status, timestamps) are what User::new consumes after the proof
step succeeds. See § Trusted login threat model in the Service
Architecture doc for why this is safe to ship to anyone who can
reach the socket.
TrustedLoginOk
Trusted login succeeded; the connection is now authenticated.
SessionKeyChallenge
Challenge bytes returned in response to SessionKeyChallenge. The
client signs these with the named pubkey’s private key and returns the
signature in SessionKeyRegister.
Trait Implementations§
Source§impl Clone for ServiceResponse
impl Clone for ServiceResponse
Source§fn clone(&self) -> ServiceResponse
fn clone(&self) -> ServiceResponse
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ServiceResponse
impl Debug for ServiceResponse
Source§impl<'de> Deserialize<'de> for ServiceResponse
impl<'de> Deserialize<'de> for ServiceResponse
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>,
Auto Trait Implementations§
impl !Freeze for ServiceResponse
impl RefUnwindSafe for ServiceResponse
impl Send for ServiceResponse
impl Sync for ServiceResponse
impl Unpin for ServiceResponse
impl UnsafeUnpin for ServiceResponse
impl UnwindSafe for ServiceResponse
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more