arch_pkg_db/misc/attachment/
into.rs

1use super::Attached;
2
3/// Utility trait to create object with attachments.
4pub trait IntoAttached: Sized {
5    /// Attach metadata to an object.
6    fn into_attached<Attachment>(self, attachment: Attachment) -> Attached<Self, Attachment> {
7        Attached::new(self, attachment)
8    }
9}
10
11impl<Main: Sized> IntoAttached for Main {}