pub struct AccountToken {
pub host_key: PublicKey,
pub account: PublicKey,
pub valid_until: DateTime<Utc>,
pub signature: Signature,
}Expand description
An account token is used to pay for RPC calls that do not require a contract.
Fields§
§host_key: PublicKey§account: PublicKey§valid_until: DateTime<Utc>§signature: SignatureImplementations§
Source§impl AccountToken
impl AccountToken
pub fn new(account_key: &PrivateKey, host_key: PublicKey) -> Self
Trait Implementations§
Source§impl AsyncSiaDecodable for AccountToken
impl AsyncSiaDecodable for AccountToken
Source§impl Clone for AccountToken
impl Clone for AccountToken
Source§fn clone(&self) -> AccountToken
fn clone(&self) -> AccountToken
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 AccountToken
impl Debug for AccountToken
Source§impl<'de> Deserialize<'de> for AccountToken
impl<'de> Deserialize<'de> for AccountToken
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 PartialEq for AccountToken
impl PartialEq for AccountToken
Source§fn eq(&self, other: &AccountToken) -> bool
fn eq(&self, other: &AccountToken) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for AccountToken
impl Serialize for AccountToken
Source§impl SiaDecodable for AccountToken
impl SiaDecodable for AccountToken
Source§impl SiaEncodable for AccountToken
impl SiaEncodable for AccountToken
impl StructuralPartialEq for AccountToken
Auto Trait Implementations§
impl Freeze for AccountToken
impl RefUnwindSafe for AccountToken
impl Send for AccountToken
impl Sync for AccountToken
impl Unpin for AccountToken
impl UnsafeUnpin for AccountToken
impl UnwindSafe for AccountToken
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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