pub struct UpdateClientRequest {
pub client_pk: PublicKey,
pub new_label: Option<Option<String>>,
pub new_expires_at: Option<Option<TimestampMs>>,
}Expand description
A request to update the properties of an existing client.
Fields§
§client_pk: PublicKeyThe public key of the client to update.
new_label: Option<Option<String>>The updated label for the client.
None: leave the label unchanged.Some(None): clear the label.Some(Some(label)): set the label.
new_expires_at: Option<Option<TimestampMs>>The updated expiration for the client.
None: leave the expiration unchanged.Some(None): make the client never expire. Use carefully!Some(Some(expires_at)): set the expiration.
Implementations§
Source§impl UpdateClientRequest
impl UpdateClientRequest
Sourcepub fn new(
client_pk: PublicKey,
label: Option<String>,
clear_label: bool,
expires_at: Option<TimestampMs>,
clear_expiration: bool,
) -> Result<Self>
pub fn new( client_pk: PublicKey, label: Option<String>, clear_label: bool, expires_at: Option<TimestampMs>, clear_expiration: bool, ) -> Result<Self>
Build a request from explicit set/clear flags, used by wrappers whose
serialization can’t express the Option<Option<_>> fields, such as the
Sidecar’s JSON API, UniFFI, and the CLI.
- At most one of
clear_labelorlabelcan be set. - At most one of
clear_expirationorexpires_atcan be set.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for UpdateClientRequest
impl<'de> Deserialize<'de> for UpdateClientRequest
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<UpdateClientRequest> for UpdateClientRequest
impl From<UpdateClientRequest> for UpdateClientRequest
Source§fn from(req: UpdateClientRequest) -> Self
fn from(req: UpdateClientRequest) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for UpdateClientRequest
impl RefUnwindSafe for UpdateClientRequest
impl Send for UpdateClientRequest
impl Sync for UpdateClientRequest
impl Unpin for UpdateClientRequest
impl UnwindSafe for UpdateClientRequest
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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