pub struct SecretLockJson {
pub version: u16,
pub owner_address: String,
pub mosaic_id: String,
pub amount: String,
pub end_height: String,
pub status: u8,
pub hash_algorithm: u8,
pub secret: String,
pub recipient_address: String,
pub composite_hash: String,
}Expand description
SecretLockEntryDTO。compositeHash は、シークレットと受取人から求めたハッシュ(木のキーのもと)
Fields§
§version: u16§owner_address: String§mosaic_id: String§amount: String§end_height: String§status: u8§hash_algorithm: u8§secret: String§recipient_address: String§composite_hash: StringImplementations§
Source§impl SecretLockJson
impl SecretLockJson
Sourcepub fn to_state_bytes(&self) -> Result<Vec<u8>, RestError>
pub fn to_state_bytes(&self) -> Result<Vec<u8>, RestError>
状態のバイト列。catapult の SecretLockInfoSerializer。compositeHash は入らない
Sourcepub fn from_state_bytes(
bytes: &[u8],
composite_hash: &Hash256,
) -> Result<Self, RestError>
pub fn from_state_bytes( bytes: &[u8], composite_hash: &Hash256, ) -> Result<Self, RestError>
状態のバイト列と、木のキーのもとのハッシュから、REST が返す形にする。SecretLockJson::to_state_bytes の逆
pub fn state_hash(&self) -> Result<Hash256, RestError>
Trait Implementations§
Source§impl Clone for SecretLockJson
impl Clone for SecretLockJson
Source§fn clone(&self) -> SecretLockJson
fn clone(&self) -> SecretLockJson
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 SecretLockJson
impl Debug for SecretLockJson
Source§impl<'de> Deserialize<'de> for SecretLockJson
impl<'de> Deserialize<'de> for SecretLockJson
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
impl Eq for SecretLockJson
Source§impl PartialEq for SecretLockJson
impl PartialEq for SecretLockJson
Source§impl Serialize for SecretLockJson
impl Serialize for SecretLockJson
impl StructuralPartialEq for SecretLockJson
Auto Trait Implementations§
impl Freeze for SecretLockJson
impl RefUnwindSafe for SecretLockJson
impl Send for SecretLockJson
impl Sync for SecretLockJson
impl Unpin for SecretLockJson
impl UnsafeUnpin for SecretLockJson
impl UnwindSafe for SecretLockJson
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