pub struct LoginRegisterWithPatRequest {
pub version_info: ClientVersionInfo,
pub token: SecretString,
pub client_context: Option<String>,
}Expand description
Combined login-with-PAT + register request for the server.
Shares the ClientVersionInfo prefix with LoginRegisterRequest so the
server gates on the protocol version once before attempting either body
shape. The server verifies the token locally, then submits
Operation::Register through consensus. The client_id is carried in
the VSR RequestHeader.client field (populated by the SDK at encode
time); the body no longer duplicates it.
Wire format:
[ClientVersionInfo]
[token_len:u8][token:N]
[context_len:u32_le][context:N?]Fields§
§version_info: ClientVersionInfo§token: SecretString§client_context: Option<String>Implementations§
Source§impl LoginRegisterWithPatRequest
impl LoginRegisterWithPatRequest
Sourcepub fn decode_after_prefix(
version_info: ClientVersionInfo,
tail: &[u8],
) -> Result<(Self, usize), WireError>
pub fn decode_after_prefix( version_info: ClientVersionInfo, tail: &[u8], ) -> Result<(Self, usize), WireError>
Decode the body after the ClientVersionInfo prefix has already
been consumed; the server-side login gate decodes the prefix once
for both login-register shapes. Returns the bytes consumed from
tail.
§Errors
WireError when tail is truncated or a field is malformed.
Trait Implementations§
Source§impl Clone for LoginRegisterWithPatRequest
impl Clone for LoginRegisterWithPatRequest
Source§fn clone(&self) -> LoginRegisterWithPatRequest
fn clone(&self) -> LoginRegisterWithPatRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LoginRegisterWithPatRequest
impl Debug for LoginRegisterWithPatRequest
Source§impl WireDecode for LoginRegisterWithPatRequest
impl WireDecode for LoginRegisterWithPatRequest
Auto Trait Implementations§
impl Freeze for LoginRegisterWithPatRequest
impl RefUnwindSafe for LoginRegisterWithPatRequest
impl Send for LoginRegisterWithPatRequest
impl Sync for LoginRegisterWithPatRequest
impl Unpin for LoginRegisterWithPatRequest
impl UnsafeUnpin for LoginRegisterWithPatRequest
impl UnwindSafe for LoginRegisterWithPatRequest
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
Mutably borrows from an owned value. Read more