libduvet/model/attachment
Types
A file: one sent with a message, or one of a user’s or a space’s files (their attachment lists).
pub type Attachment {
Attachment(
id: String,
message_id: option.Option(String),
filename: String,
content_type: String,
size_bytes: Int,
width: option.Option(Int),
height: option.Option(Int),
created_at: timestamp.Timestamp,
deleted_at: option.Option(timestamp.Timestamp),
deleted: option.Option(Bool),
pending: option.Option(Bool),
url: option.Option(String),
)
}
Constructors
-
Attachment( id: String, message_id: option.Option(String), filename: String, content_type: String, size_bytes: Int, width: option.Option(Int), height: option.Option(Int), created_at: timestamp.Timestamp, deleted_at: option.Option(timestamp.Timestamp), deleted: option.Option(Bool), pending: option.Option(Bool), url: option.Option(String), )
Values
pub fn from_json(
object: dict.Dict(String, dynamic.Dynamic),
) -> Attachment