pub struct AttachmentBuilder { /* fields omitted */ }
Builder pattern for creating an Attachment
Make sure you call build()
when done to consume the builder and return the underlying Attachment
Constructs an AttachmentBuilder
. The required parameters are the content (base64 string)
and the filename.
let builder = AttachmentBuilder::new(
"SGVsbG8gV29ybGQh",
"file.txt");
Sets the mime type on the Attachment
let builder = AttachmentBuilder::new(
"SGVsbG8gV29ybGQh",
"file.txt")
.attachment_type("text/plain");
Sets the disposition of the Attachment
let builder = AttachmentBuilder::new(
"SGVsbG8gV29ybGQh",
"file.txt")
.disposition("inline");
pub fn content_id( self, id: impl Into<String> ) -> Self | [src] |
Sets the content_id of the Attachment
let builder = AttachmentBuilder::new(
"SGVsbG8gV29ybGQh",
"file.txt")
.content_id("id");
Consumes the AttachmentBuilder
and returns the underlying Attachment
let builder = AttachmentBuilder::new(
"SGVsbG8gV29ybGQh",
"file.txt")
.build();
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static