Struct miden_objects::notes::PartialNote
source · pub struct PartialNote { /* private fields */ }Expand description
Partial information about a note.
Partial note consists of NoteMetadata, NoteAssets, and a recipient digest (see super::NoteRecipient). However, it does not contain detailed recipient info, including note script, note inputs, and note’s serial number. This means that a partial note is sufficient to compute note ID and note header, but not sufficient to compute note nullifier, and generally does not have enough info to execute the note.
Implementations§
source§impl PartialNote
impl PartialNote
sourcepub fn new(
metadata: NoteMetadata,
recipient_digest: Digest,
assets: NoteAssets,
) -> Self
pub fn new( metadata: NoteMetadata, recipient_digest: Digest, assets: NoteAssets, ) -> Self
Returns a new PartialNote instantiated from the provided parameters.
sourcepub fn metadata(&self) -> &NoteMetadata
pub fn metadata(&self) -> &NoteMetadata
Returns the metadata associated with this note.
sourcepub fn recipient_digest(&self) -> Digest
pub fn recipient_digest(&self) -> Digest
Returns the digest of the recipient associated with this note.
See super::NoteRecipient for more info.
sourcepub fn assets(&self) -> &NoteAssets
pub fn assets(&self) -> &NoteAssets
Returns a list of assets associated with this note.
Trait Implementations§
source§impl Clone for PartialNote
impl Clone for PartialNote
source§fn clone(&self) -> PartialNote
fn clone(&self) -> PartialNote
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 PartialNote
impl Debug for PartialNote
source§impl Deserializable for PartialNote
impl Deserializable for PartialNote
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 PartialNote
impl From<&Note> for PartialNote
source§impl From<&PartialNote> for NoteHeader
impl From<&PartialNote> for NoteHeader
source§fn from(note: &PartialNote) -> Self
fn from(note: &PartialNote) -> Self
Converts to this type from the input type.
source§impl From<Note> for PartialNote
impl From<Note> for PartialNote
source§impl From<PartialNote> for NoteHeader
impl From<PartialNote> for NoteHeader
source§fn from(note: PartialNote) -> Self
fn from(note: PartialNote) -> Self
Converts to this type from the input type.
source§impl PartialEq for PartialNote
impl PartialEq for PartialNote
source§fn eq(&self, other: &PartialNote) -> bool
fn eq(&self, other: &PartialNote) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Serializable for PartialNote
impl Serializable for PartialNote
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 Eq for PartialNote
impl StructuralPartialEq for PartialNote
Auto Trait Implementations§
impl Freeze for PartialNote
impl RefUnwindSafe for PartialNote
impl Send for PartialNote
impl Sync for PartialNote
impl Unpin for PartialNote
impl UnwindSafe for PartialNote
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)