Enum miden_client::transactions::OutputNote
source · pub enum OutputNote {
Full(Note),
Partial(PartialNote),
Header(NoteHeader),
}Expand description
The types of note outputs supported by the transaction kernel.
Variants§
Implementations§
source§impl OutputNote
impl OutputNote
sourcepub fn assets(&self) -> Option<&NoteAssets>
pub fn assets(&self) -> Option<&NoteAssets>
The assets contained in the note.
sourcepub fn id(&self) -> NoteId
pub fn id(&self) -> NoteId
Unique note identifier.
This value is both an unique identifier and a commitment to the note.
sourcepub fn recipient_digest(&self) -> Option<RpoDigest>
pub fn recipient_digest(&self) -> Option<RpoDigest>
Value that represents under which condition a note can be consumed.
See crate::notes::NoteRecipient for more details.
sourcepub fn metadata(&self) -> &NoteMetadata
pub fn metadata(&self) -> &NoteMetadata
Note’s metadata.
sourcepub fn shrink(&self) -> OutputNote
pub fn shrink(&self) -> OutputNote
Erase private note information.
Specifically:
- Full private notes are converted into note headers.
- All partial notes are converted into note headers.
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>(source: &mut R) -> Result<OutputNote, DeserializationError>where
R: ByteReader,
fn read_from<R>(source: &mut R) -> Result<OutputNote, DeserializationError>where
R: ByteReader,
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 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>(&self, target: &mut W)where
W: ByteWriter,
fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
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 TryFrom<OutputNote> for OutputNoteRecord
impl TryFrom<OutputNote> for OutputNoteRecord
OutputNote can always be turned into an OutputNoteRecord when they’re either
OutputNote::Full or OutputNote::Partial and always fail the conversion if it’s
OutputNote::Header. This also mean that output_note.try_from() can also be used as a way to
filter the full and partial output notes
§type Error = ClientError
type Error = ClientError
The type returned in the event of a conversion error.
impl Eq for OutputNote
impl StructuralPartialEq for OutputNote
Auto Trait Implementations§
impl Freeze for OutputNote
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)