pub struct RevealedAttach {
pub id: AttachId,
pub media_type: MediaType,
pub salt: u64,
}
Fields§
§id: AttachId
§media_type: MediaType
We do not enforce a MIME standard since non-standard types can be also used
salt: u64
Implementations§
Source§impl RevealedAttach
impl RevealedAttach
Sourcepub fn new(id: AttachId, media_type: MediaType) -> RevealedAttach
pub fn new(id: AttachId, media_type: MediaType) -> RevealedAttach
Creates new revealed attachment for the attachment id and MIME type.
Uses thread_rng
to initialize RevealedAttach::salt
.
Trait Implementations§
Source§impl Clone for RevealedAttach
impl Clone for RevealedAttach
Source§fn clone(&self) -> RevealedAttach
fn clone(&self) -> RevealedAttach
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 CommitStrategy for RevealedAttach
impl CommitStrategy for RevealedAttach
Source§type Strategy = ConcealStrict
type Strategy = ConcealStrict
Specific strategy. List of supported strategies: Read more
Source§impl CommitVerify<RevealedAttach, StrictEncodedProtocol> for ConcealedAttach
impl CommitVerify<RevealedAttach, StrictEncodedProtocol> for ConcealedAttach
Source§fn commit(revealed: &RevealedAttach) -> ConcealedAttach
fn commit(revealed: &RevealedAttach) -> ConcealedAttach
Creates a commitment to a byte representation of a given message
Source§impl Conceal for RevealedAttach
impl Conceal for RevealedAttach
Source§type Concealed = ConcealedAttach
type Concealed = ConcealedAttach
The resulting confidential type concealing original data.
Source§impl Debug for RevealedAttach
impl Debug for RevealedAttach
Source§impl<'de> Deserialize<'de> for RevealedAttach
impl<'de> Deserialize<'de> for RevealedAttach
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RevealedAttach, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<RevealedAttach, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl ExposedState for RevealedAttach
impl ExposedState for RevealedAttach
type Confidential = ConcealedAttach
fn state_type(&self) -> StateType
fn state_data(&self) -> StateData
Source§impl Hash for RevealedAttach
impl Hash for RevealedAttach
Source§impl Ord for RevealedAttach
impl Ord for RevealedAttach
Source§fn cmp(&self, other: &RevealedAttach) -> Ordering
fn cmp(&self, other: &RevealedAttach) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for RevealedAttach
impl PartialEq for RevealedAttach
Source§impl PartialOrd for RevealedAttach
impl PartialOrd for RevealedAttach
Source§impl Serialize for RevealedAttach
impl Serialize for RevealedAttach
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl StrictDecode for RevealedAttach
impl StrictDecode for RevealedAttach
fn strict_decode( reader: &mut impl TypedRead, ) -> Result<RevealedAttach, DecodeError>
fn strict_read(lim: usize, reader: impl Read) -> Result<Self, DecodeError>
Source§impl StrictDumb for RevealedAttach
impl StrictDumb for RevealedAttach
fn strict_dumb() -> RevealedAttach
Source§impl StrictEncode for RevealedAttach
impl StrictEncode for RevealedAttach
fn strict_encode<W>(&self, writer: W) -> Result<W, Error>where
W: TypedWrite,
fn strict_write(&self, lim: usize, writer: impl Write) -> Result<usize, Error>
Source§impl StrictStruct for RevealedAttach
impl StrictStruct for RevealedAttach
const ALL_FIELDS: &'static [&'static str]
fn strict_check_fields()
fn strict_type_info() -> TypeInfo<Self>
Source§impl StrictType for RevealedAttach
impl StrictType for RevealedAttach
const STRICT_LIB_NAME: &'static str = LIB_NAME_RGB
fn strict_name() -> Option<TypeName>
impl Eq for RevealedAttach
impl StrictProduct for RevealedAttach
impl StructuralPartialEq for RevealedAttach
Auto Trait Implementations§
impl Freeze for RevealedAttach
impl RefUnwindSafe for RevealedAttach
impl Send for RevealedAttach
impl Sync for RevealedAttach
impl Unpin for RevealedAttach
impl UnwindSafe for RevealedAttach
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> CommitEncode for T
impl<T> CommitEncode for T
Source§fn commit_encode(&self, e: &mut impl Write)
fn commit_encode(&self, e: &mut impl Write)
Encodes the data for the commitment by writing them directly into a
io::Write
writer instanceSource§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.