pub struct MetadataV1 {
pub created_at: i64,
pub valid_for: i64,
pub usage_limit: u64,
pub scopes: Vec<Scope>,
}Fields§
§created_at: i64§valid_for: i64§usage_limit: u64§scopes: Vec<Scope>Implementations§
Source§impl MetadataV1
impl MetadataV1
Sourcepub fn to_canonical_json(&self) -> Result<String>
pub fn to_canonical_json(&self) -> Result<String>
Encode the metadata to a canonical JSON string for signing
Trait Implementations§
Source§impl Clone for MetadataV1
impl Clone for MetadataV1
Source§fn clone(&self) -> MetadataV1
fn clone(&self) -> MetadataV1
Returns a duplicate of the value. Read more
1.0.0 · 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 MetadataV1
impl Debug for MetadataV1
Source§impl<'de> Deserialize<'de> for MetadataV1
impl<'de> Deserialize<'de> for MetadataV1
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 JsonSchema for MetadataV1
impl JsonSchema for MetadataV1
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for MetadataV1
impl PartialEq for MetadataV1
Source§impl Serialize for MetadataV1
impl Serialize for MetadataV1
Source§impl TryFrom<MetadataRawV1> for MetadataV1
impl TryFrom<MetadataRawV1> for MetadataV1
Source§impl TryFrom<MetadataV1> for MetadataRawV1
impl TryFrom<MetadataV1> for MetadataRawV1
impl StructuralPartialEq for MetadataV1
Auto Trait Implementations§
impl Freeze for MetadataV1
impl RefUnwindSafe for MetadataV1
impl Send for MetadataV1
impl Sync for MetadataV1
impl Unpin for MetadataV1
impl UnwindSafe for MetadataV1
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