[−][src]Struct sampi::Sampi
Fields
public_key: [u8; 32]
unix_time: i64
data: SampiData
metadata: SampiMetadata
Implementations
impl Sampi
[src]
pub fn from_bytes(bytes: &[u8]) -> Result<Self>
[src]
Attempt to deserialize a Sampi object from a slice of bytes
pub fn from_bytes_iterator(bytes: &[u8]) -> impl Iterator<Item = Self> + '_
[src]
Attempt to deserialize multiple Sampi objects from a slice of bytes
pub fn to_bytes(&self) -> Vec<u8>
[src]
Serialize to a Vector of bytes
pub fn from_hex(hex_string: &str) -> Result<Self>
[src]
Attempt to deserialize a Sampi object from a &str of hex
pub fn to_hex(&self) -> String
[src]
Serialize to a hex string
pub fn from_base32(base32_string: &str) -> Result<Self>
[src]
Attempt to deserialize a Sampi object from a &str of base32
pub fn to_base32(&self) -> String
[src]
Serialize to a base32 string
pub fn from_base58(base58_string: &str) -> Result<Self>
[src]
Attempt to deserialize a Sampi object from a &str of base58
pub fn to_base58(&self) -> String
[src]
Serialize to a base58 string
pub fn to_base64(&self) -> String
[src]
Serialize to a base64 string
pub fn from_base64(base64_string: &str) -> Result<Self>
[src]
Attempt to deserialize a Sampi object from a &str of base64
pub fn get_pow_score(&self) -> u8
[src]
Get the Proof of Work Score
pub fn get_public_key_as_hex(&self) -> String
[src]
Public key as a hex string
pub fn get_hash_as_hex(&self) -> String
[src]
Get the SHA256 hash of the serialized bytes of this object, as a string
pub fn get_hash(&self) -> [u8; 32]
[src]
Get the SHA256 hash of the serialized bytes of this object, as an array of bytes
Trait Implementations
impl Clone for Sampi
[src]
impl Debug for Sampi
[src]
impl<'de> Deserialize<'de> for Sampi
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Eq for Sampi
[src]
impl FromStr for Sampi
[src]
type Err = Box<dyn Error + Send + Sync + 'static>
The associated error which can be returned from parsing.
fn from_str(data: &str) -> Result<Self, Self::Err>
[src]
Attempt to deserialize from a string of base64, base58, base32, or hex
impl Ord for Sampi
[src]
fn cmp(&self, other: &Self) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Sampi> for Sampi
[src]
impl PartialOrd<Sampi> for Sampi
[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl Serialize for Sampi
[src]
Auto Trait Implementations
impl RefUnwindSafe for Sampi
impl Send for Sampi
impl Sync for Sampi
impl Unpin for Sampi
impl UnwindSafe for Sampi
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,