#[non_exhaustive]pub struct RawDocument {
pub content: Bytes,
pub mime_type: String,
pub display_name: String,
/* private fields */
}Expand description
Payload message of raw document content (bytes).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.content: BytesInline document content.
mime_type: StringAn IANA MIME type (RFC6838) indicating the nature and format of the content.
display_name: StringThe display name of the document, it supports all Unicode characters except
the following:
*, ?, [, ], %, {, },', \", ,
~, = and : are reserved.
If not specified, a default ID is generated.
Implementations§
Source§impl RawDocument
impl RawDocument
pub fn new() -> Self
Sourcepub fn set_content<T: Into<Bytes>>(self, v: T) -> Self
pub fn set_content<T: Into<Bytes>>(self, v: T) -> Self
Sourcepub fn set_mime_type<T: Into<String>>(self, v: T) -> Self
pub fn set_mime_type<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_display_name<T: Into<String>>(self, v: T) -> Self
pub fn set_display_name<T: Into<String>>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for RawDocument
impl Clone for RawDocument
Source§fn clone(&self) -> RawDocument
fn clone(&self) -> RawDocument
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RawDocument
impl Debug for RawDocument
Source§impl Default for RawDocument
impl Default for RawDocument
Source§fn default() -> RawDocument
fn default() -> RawDocument
Returns the “default value” for a type. Read more
Source§impl Message for RawDocument
impl Message for RawDocument
Source§impl PartialEq for RawDocument
impl PartialEq for RawDocument
impl StructuralPartialEq for RawDocument
Auto Trait Implementations§
impl !Freeze for RawDocument
impl RefUnwindSafe for RawDocument
impl Send for RawDocument
impl Sync for RawDocument
impl Unpin for RawDocument
impl UnwindSafe for RawDocument
Blanket Implementations§
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