pub struct AttachmentMut<'a> { /* private fields */ }Expand description
A mutable reference to an Attachment. Implements DerefMut to &mut Attachment
Implementations§
Source§impl AttachmentMut<'_>
impl AttachmentMut<'_>
Sourcepub fn as_ref(&self) -> AttachmentRef<'_>
pub fn as_ref(&self) -> AttachmentRef<'_>
Get an immutable reference to this attachment.
Sourcepub fn edit(&mut self, f: impl FnOnce(&mut AttachmentMut<'_>)) -> &mut Self
pub fn edit(&mut self, f: impl FnOnce(&mut AttachmentMut<'_>)) -> &mut Self
Edit this attachment with a closure, which is passed a mutable reference to this attachment.
Sourcepub fn database_mut(&mut self) -> &mut Database
pub fn database_mut(&mut self) -> &mut Database
Get a mutable reference to the database that owns this attachment.
Sourcepub fn foreach_entry_mut<F>(&mut self, f: F, include_historical: bool)
pub fn foreach_entry_mut<F>(&mut self, f: F, include_historical: bool)
Get an iterator over the entries that reference this attachment, with mutable access.
If include_historical is false, only returns entries that currently reference this
attachment. If include_historical is true, also returns old versions of entries that
reference this attachment, even if they have been modified to no longer reference it.
Methods from Deref<Target = Attachment>§
Sourcepub fn id(&self) -> AttachmentId
pub fn id(&self) -> AttachmentId
Get the ID of this attachment.
Trait Implementations§
Source§impl Deref for AttachmentMut<'_>
impl Deref for AttachmentMut<'_>
Auto Trait Implementations§
impl<'a> !UnwindSafe for AttachmentMut<'a>
impl<'a> Freeze for AttachmentMut<'a>
impl<'a> RefUnwindSafe for AttachmentMut<'a>
impl<'a> Send for AttachmentMut<'a>
impl<'a> Sync for AttachmentMut<'a>
impl<'a> Unpin for AttachmentMut<'a>
impl<'a> UnsafeUnpin for AttachmentMut<'a>
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