Struct miden_objects::transaction::OutputNote
source · pub struct OutputNote { /* private fields */ }Expand description
An note create during a transaction.
When a note is produced in a transaction, the note’s recipient, assets, and metadata must be known. However, other information about the note may or may not be know to the note’s producer.
Implementations§
source§impl OutputNote
impl OutputNote
sourcepub fn new(
recipient: Digest,
assets: NoteAssets,
metadata: NoteMetadata
) -> Self
pub fn new( recipient: Digest, assets: NoteAssets, metadata: NoteMetadata ) -> Self
Returns a new OutputNote instantiated from the provided parameters.
sourcepub fn assets(&self) -> &NoteAssets
pub fn assets(&self) -> &NoteAssets
Returns a reference to the asset of this note.
sourcepub fn metadata(&self) -> &NoteMetadata
pub fn metadata(&self) -> &NoteMetadata
Returns the metadata associated with this note.
Trait Implementations§
source§impl Clone for OutputNote
impl Clone for OutputNote
source§fn clone(&self) -> OutputNote
fn clone(&self) -> OutputNote
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 OutputNote
impl Debug for OutputNote
source§impl Deserializable for OutputNote
impl Deserializable for OutputNote
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 OutputNote
impl From<&Note> for OutputNote
source§impl From<&OutputNote> for NoteEnvelope
impl From<&OutputNote> for NoteEnvelope
source§fn from(note_stub: &OutputNote) -> Self
fn from(note_stub: &OutputNote) -> Self
Converts to this type from the input type.
source§impl From<Note> for OutputNote
impl From<Note> for OutputNote
source§impl From<OutputNote> for NoteEnvelope
impl From<OutputNote> for NoteEnvelope
source§fn from(note_stub: OutputNote) -> Self
fn from(note_stub: OutputNote) -> Self
Converts to this type from the input type.
source§impl PartialEq for OutputNote
impl PartialEq for OutputNote
source§fn eq(&self, other: &OutputNote) -> bool
fn eq(&self, other: &OutputNote) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Serializable for OutputNote
impl Serializable for OutputNote
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
source§impl ToEnvelope for OutputNote
impl ToEnvelope for OutputNote
fn id(&self) -> NoteId
fn metadata(&self) -> NoteMetadata
fn to_envelope(&self) -> NoteEnvelope
impl Eq for OutputNote
impl StructuralPartialEq for OutputNote
Auto Trait Implementations§
impl RefUnwindSafe for OutputNote
impl Send for OutputNote
impl Sync for OutputNote
impl Unpin for OutputNote
impl UnwindSafe for OutputNote
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