pub struct CertificateData {
pub game_path_name: String,
pub total_challenges: usize,
pub solved_challenges: usize,
pub performance_percentage: u8,
pub profile_name: String,
pub date: DateTime<Utc>,
pub signature: Option<Vec<u8>>,
}Fields§
§game_path_name: String§total_challenges: usize§solved_challenges: usize§performance_percentage: u8§profile_name: String§date: DateTime<Utc>§signature: Option<Vec<u8>>Implementations§
Source§impl CertificateData
impl CertificateData
pub fn new( game_path_name: String, total_challenges: usize, solved_challenges: usize, player_name: String, date: DateTime<Utc>, ) -> Self
pub fn new_data_copy(&self) -> Self
pub fn to_sha256(&self) -> Vec<u8> ⓘ
pub fn to_base64(&self) -> String
pub fn from_base64(encoded: &str) -> Result<Self>
pub fn create_signature(&mut self) -> Result<()>
pub fn verify(&self) -> Result<bool>
Trait Implementations§
Source§impl Clone for CertificateData
impl Clone for CertificateData
Source§fn clone(&self) -> CertificateData
fn clone(&self) -> CertificateData
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 CertificateData
impl Debug for CertificateData
Source§impl Default for CertificateData
impl Default for CertificateData
Source§fn default() -> CertificateData
fn default() -> CertificateData
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CertificateData
impl<'de> Deserialize<'de> for CertificateData
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<PerformanceRecord> for CertificateData
impl From<PerformanceRecord> for CertificateData
Source§fn from(record: PerformanceRecord) -> Self
fn from(record: PerformanceRecord) -> Self
Converts to this type from the input type.
Source§impl Hash for CertificateData
impl Hash for CertificateData
Source§impl PartialEq for CertificateData
impl PartialEq for CertificateData
Source§impl Serialize for CertificateData
impl Serialize for CertificateData
impl Eq for CertificateData
impl StructuralPartialEq for CertificateData
Auto Trait Implementations§
impl Freeze for CertificateData
impl RefUnwindSafe for CertificateData
impl Send for CertificateData
impl Sync for CertificateData
impl Unpin for CertificateData
impl UnwindSafe for CertificateData
Blanket Implementations§
Source§impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
Source§fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
Convert the source color to the destination color using the specified
method
Source§fn adapt_into(self) -> D
fn adapt_into(self) -> D
Convert the source color to the destination color using the bradford
method by default
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> FromQuery for Twhere
T: DeserializeOwned,
impl<T> FromQuery for Twhere
T: DeserializeOwned,
Source§impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
Source§fn into_color(self) -> U
fn into_color(self) -> U
Convert into T with values clamped to the color defined bounds Read more
Source§impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
Source§fn into_color_unclamped(self) -> U
fn into_color_unclamped(self) -> U
Convert into T. The resulting color might be invalid in its color space Read more
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§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.Source§impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
Source§fn try_into_color(self) -> Result<U, OutOfBounds<U>>
fn try_into_color(self) -> Result<U, OutOfBounds<U>>
Convert into T, returning ok if the color is inside of its defined
range, otherwise an
OutOfBounds error is returned which contains
the unclamped color. Read more