pub struct ApSource {
pub media_type: String,
pub content: String,
}Expand description
Original source format for content that was converted from another format.
This structure is used to preserve the original source content (e.g., Markdown)
when content is converted to HTML for the content field. This allows clients
to retrieve the original format for editing without reverse-engineering from HTML.
§Examples
use jdt_activity_pub::ApSource;
let source = ApSource {
media_type: "text/markdown".to_string(),
content: "# Hello\n\nThis is **bold** text.".to_string(),
};Fields§
§media_type: StringThe media type of the original source format (e.g., “text/markdown”, “text/plain”)
content: StringThe original content in its source format
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ApSource
impl<'de> Deserialize<'de> for ApSource
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for ApSource
impl Ord for ApSource
Source§impl PartialOrd for ApSource
impl PartialOrd for ApSource
impl Eq for ApSource
impl StructuralPartialEq for ApSource
Auto Trait Implementations§
impl Freeze for ApSource
impl RefUnwindSafe for ApSource
impl Send for ApSource
impl Sync for ApSource
impl Unpin for ApSource
impl UnwindSafe for ApSource
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more