Struct didcomm_rs::AttachmentBuilder
source[−]pub struct AttachmentBuilder { /* private fields */ }
Expand description
Builder of attachment metadata and payload.
Used to construct and inject Attachment into Message
Implementations
Constructor of new instance of the builder.
Parameters
included_mod_time
-bool
value indicating if this attachment should be timestamped on attaching. Iftrue
- will updatelastmod_time
property on builder consumption.
Optional, but recommended identifier of attachment content.
Parameters
id
- String ofAttachment
identifier
Describes the media (MIME) type of the attached content
Parameters
media_type
- String of media type description
Describes the format of the attachment if the media_type
is not sufficient.
Parameters
format
- String format identifier
mostly relevant when content is included by reference instead of by value. Lets the receiver guess how expensive it will be, in time, bandwidth, and storage, to fully fetch the attachment.
Parameters
bytes
- usize of bytes.
Attach actual payload in form of AttachmentData
Consumes AttachmentDataBuilder
to do so.
Parameters
attachment_data
- ‘AttachmentDataBuilder’ instance, prepopulated.