#[non_exhaustive]pub enum PartContent {
Text {
text: String,
},
Raw {
raw: String,
},
Url {
url: String,
},
Data {
data: Value,
},
}Expand description
The content of a Part, discriminated by field presence (proto oneof).
In JSON, exactly one field is present: "text", "raw", "url", or
"data".
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Text
Plain-text content.
Raw
Raw binary content (base64-encoded in JSON).
Url
URL reference to content.
Data
Structured JSON data.
Trait Implementations§
Source§impl Clone for PartContent
impl Clone for PartContent
Source§fn clone(&self) -> PartContent
fn clone(&self) -> PartContent
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 PartContent
impl Debug for PartContent
Source§impl<'de> Deserialize<'de> for PartContent
impl<'de> Deserialize<'de> for PartContent
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PartContent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PartContent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for PartContent
impl PartialEq for PartContent
Source§impl Serialize for PartContent
impl Serialize for PartContent
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for PartContent
impl StructuralPartialEq for PartContent
Auto Trait Implementations§
impl Freeze for PartContent
impl RefUnwindSafe for PartContent
impl Send for PartContent
impl Sync for PartContent
impl Unpin for PartContent
impl UnsafeUnpin for PartContent
impl UnwindSafe for PartContent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.