Struct miden_objects::notes::NoteEnvelope
source · pub struct NoteEnvelope { /* private fields */ }Expand description
Holds the strictly required, public information of a note.
See NoteId and NoteMetadata for additional details.
Implementations§
source§impl NoteEnvelope
impl NoteEnvelope
sourcepub fn new(
note_id: NoteId,
note_metadata: NoteMetadata
) -> Result<Self, NoteError>
pub fn new( note_id: NoteId, note_metadata: NoteMetadata ) -> Result<Self, NoteError>
Returns a new NoteEnvelope object.
sourcepub fn id(&self) -> NoteId
pub fn id(&self) -> NoteId
Returns the note’s identifier.
The NoteId value is both an unique identifier and a commitment to the note.
sourcepub fn metadata(&self) -> &NoteMetadata
pub fn metadata(&self) -> &NoteMetadata
Returns the note’s metadata.
Trait Implementations§
source§impl Clone for NoteEnvelope
impl Clone for NoteEnvelope
source§fn clone(&self) -> NoteEnvelope
fn clone(&self) -> NoteEnvelope
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 NoteEnvelope
impl Debug for NoteEnvelope
source§impl Deserializable for NoteEnvelope
impl Deserializable for NoteEnvelope
source§fn read_from<R: ByteReader>(
source: &mut R
) -> Result<Self, DeserializationError>
fn read_from<R: ByteReader>( source: &mut R ) -> Result<Self, DeserializationError>
Reads a sequence of bytes from the provided
source, attempts to deserialize these bytes
into Self, and returns the result. Read moresource§fn read_from_bytes(bytes: &[u8]) -> Result<Self, DeserializationError>
fn read_from_bytes(bytes: &[u8]) -> Result<Self, DeserializationError>
source§impl From<&Note> for NoteEnvelope
impl From<&Note> for NoteEnvelope
source§impl From<&NoteEnvelope> for [Word; 2]
impl From<&NoteEnvelope> for [Word; 2]
source§fn from(note_envelope: &NoteEnvelope) -> Self
fn from(note_envelope: &NoteEnvelope) -> Self
Converts to this type from the input type.
source§impl From<&NoteEnvelope> for [Felt; 8]
impl From<&NoteEnvelope> for [Felt; 8]
source§fn from(note_envelope: &NoteEnvelope) -> Self
fn from(note_envelope: &NoteEnvelope) -> Self
Converts to this type from the input type.
source§impl From<&NoteEnvelope> for [u8; 64]
impl From<&NoteEnvelope> for [u8; 64]
source§fn from(note_envelope: &NoteEnvelope) -> Self
fn from(note_envelope: &NoteEnvelope) -> Self
Converts to this type from the input type.
source§impl From<&OutputNote> for NoteEnvelope
impl From<&OutputNote> for NoteEnvelope
source§fn from(value: &OutputNote) -> Self
fn from(value: &OutputNote) -> Self
Converts to this type from the input type.
source§impl From<Note> for NoteEnvelope
impl From<Note> for NoteEnvelope
source§impl From<NoteEnvelope> for [Word; 2]
impl From<NoteEnvelope> for [Word; 2]
source§fn from(note_envelope: NoteEnvelope) -> Self
fn from(note_envelope: NoteEnvelope) -> Self
Converts to this type from the input type.
source§impl From<NoteEnvelope> for [Felt; 8]
impl From<NoteEnvelope> for [Felt; 8]
source§fn from(note_envelope: NoteEnvelope) -> Self
fn from(note_envelope: NoteEnvelope) -> Self
Converts to this type from the input type.
source§impl From<NoteEnvelope> for [u8; 64]
impl From<NoteEnvelope> for [u8; 64]
source§fn from(note_envelope: NoteEnvelope) -> Self
fn from(note_envelope: NoteEnvelope) -> Self
Converts to this type from the input type.
source§impl From<OutputNote> for NoteEnvelope
impl From<OutputNote> for NoteEnvelope
source§fn from(value: OutputNote) -> Self
fn from(value: OutputNote) -> Self
Converts to this type from the input type.
source§impl PartialEq for NoteEnvelope
impl PartialEq for NoteEnvelope
source§fn eq(&self, other: &NoteEnvelope) -> bool
fn eq(&self, other: &NoteEnvelope) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Serializable for NoteEnvelope
impl Serializable for NoteEnvelope
source§fn write_into<W: ByteWriter>(&self, target: &mut W)
fn write_into<W: ByteWriter>(&self, target: &mut W)
Serializes
self into bytes and writes these bytes into the target.source§fn get_size_hint(&self) -> usize
fn get_size_hint(&self) -> usize
Returns an estimate of how many bytes are needed to represent self. Read more
impl Copy for NoteEnvelope
impl Eq for NoteEnvelope
impl StructuralPartialEq for NoteEnvelope
Auto Trait Implementations§
impl Freeze for NoteEnvelope
impl RefUnwindSafe for NoteEnvelope
impl Send for NoteEnvelope
impl Sync for NoteEnvelope
impl Unpin for NoteEnvelope
impl UnwindSafe for NoteEnvelope
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