pub struct GoldenTicket {
pub target: SaitoHash,
/* private fields */
}
Fields§
§target: SaitoHash
Implementations§
Source§impl GoldenTicket
impl GoldenTicket
pub fn new( target: SaitoHash, random: SaitoHash, public_key: SaitoPublicKey, ) -> Self
pub fn create( previous_block_hash: SaitoHash, random_bytes: SaitoHash, public_key: SaitoPublicKey, ) -> GoldenTicket
pub fn deserialize_from_net(bytes: &Vec<u8>) -> GoldenTicket
pub fn serialize_for_net(&self) -> Vec<u8> ⓘ
pub fn validate(&self, difficulty: u64) -> bool
pub fn validate_hashing_difficulty( solution_hash: &SaitoHash, difficulty: u64, ) -> bool
Trait Implementations§
Source§impl Clone for GoldenTicket
impl Clone for GoldenTicket
Source§fn clone(&self) -> GoldenTicket
fn clone(&self) -> GoldenTicket
Returns a copy 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 GoldenTicket
impl Debug for GoldenTicket
Source§impl<'de> Deserialize<'de> for GoldenTicket
impl<'de> Deserialize<'de> for GoldenTicket
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
Auto Trait Implementations§
impl Freeze for GoldenTicket
impl RefUnwindSafe for GoldenTicket
impl Send for GoldenTicket
impl Sync for GoldenTicket
impl Unpin for GoldenTicket
impl UnwindSafe for GoldenTicket
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