pub struct Part {
pub typ: Viewtype,
pub mimetype: Option<Mime>,
pub msg: String,
pub msg_raw: Option<String>,
pub bytes: usize,
pub param: Params,
pub(crate) org_filename: Option<String>,
pub error: Option<String>,
pub(crate) dehtml_failed: bool,
pub(crate) is_related: bool,
pub(crate) is_reaction: bool,
}
Expand description
Parsed MIME part.
Fields§
§typ: Viewtype
Type of the MIME part determining how it should be displayed.
mimetype: Option<Mime>
MIME type.
msg: String
Message text to be displayed in the chat.
msg_raw: Option<String>
Message text to be displayed in message info.
bytes: usize
Size of the MIME part in bytes.
param: Params
Parameters.
org_filename: Option<String>
Attachment filename.
error: Option<String>
An error detected during parsing.
dehtml_failed: bool
True if conversion from HTML to plaintext failed.
the part is a child or a descendant of multipart/related. typically, these are images that are referenced from text/html part and should not displayed inside chat.
note that multipart/related may contain further multipart nestings
and all of them needs to be marked with is_related
.
is_reaction: bool
Part is an RFC 9078 reaction.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Part
impl RefUnwindSafe for Part
impl Send for Part
impl Sync for Part
impl Unpin for Part
impl UnwindSafe for Part
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)