pub struct NoteMetadataBuilder { /* private fields */ }Expand description
A builder for constructing a new NoteMetadataBuf.
This is used to create the raw metadata blob that can be stored in the database. See the module-level documentation for a build example.
Implementations§
Source§impl NoteMetadataBuilder
impl NoteMetadataBuilder
Sourcepub fn build(self) -> NoteMetadataBuf
pub fn build(self) -> NoteMetadataBuf
Finalizes the build and returns an owned NoteMetadataBuf.
Sourcepub fn add_entry(&mut self, entry: NoteMetadataEntry<'_>)
pub fn add_entry(&mut self, entry: NoteMetadataEntry<'_>)
Adds a metadata entry to the builder.
This may reallocate the internal buffer if more space is needed.
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Creates a new builder with a specific capacity (in number of entries).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NoteMetadataBuilder
impl RefUnwindSafe for NoteMetadataBuilder
impl !Send for NoteMetadataBuilder
impl !Sync for NoteMetadataBuilder
impl Unpin for NoteMetadataBuilder
impl UnwindSafe for NoteMetadataBuilder
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