pub struct PostTextMarkdownToHtmlRequest {
pub text: String,
pub format: Option<Format>,
pub sanitize: Option<bool>,
}Fields§
§text: String原始 Markdown 字符串,最大不超过 1MB。
format: Option<Format>响应格式。传 json 时返回 JSON 包裹的 HTML 片段;传 html 时直接返回 text/html,并且响应内容会自动带完整的网页结构,适合浏览器预览或直接保存为网页文件。默认是 json。
sanitize: Option<bool>是否开启安全模式,过滤掉用户输入中的风险脚本。默认是 true。
Implementations§
Source§impl PostTextMarkdownToHtmlRequest
impl PostTextMarkdownToHtmlRequest
pub fn new(text: String) -> PostTextMarkdownToHtmlRequest
Trait Implementations§
Source§impl Clone for PostTextMarkdownToHtmlRequest
impl Clone for PostTextMarkdownToHtmlRequest
Source§fn clone(&self) -> PostTextMarkdownToHtmlRequest
fn clone(&self) -> PostTextMarkdownToHtmlRequest
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 Default for PostTextMarkdownToHtmlRequest
impl Default for PostTextMarkdownToHtmlRequest
Source§fn default() -> PostTextMarkdownToHtmlRequest
fn default() -> PostTextMarkdownToHtmlRequest
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PostTextMarkdownToHtmlRequest
impl<'de> Deserialize<'de> for PostTextMarkdownToHtmlRequest
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 PartialEq for PostTextMarkdownToHtmlRequest
impl PartialEq for PostTextMarkdownToHtmlRequest
Source§fn eq(&self, other: &PostTextMarkdownToHtmlRequest) -> bool
fn eq(&self, other: &PostTextMarkdownToHtmlRequest) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PostTextMarkdownToHtmlRequest
Auto Trait Implementations§
impl Freeze for PostTextMarkdownToHtmlRequest
impl RefUnwindSafe for PostTextMarkdownToHtmlRequest
impl Send for PostTextMarkdownToHtmlRequest
impl Sync for PostTextMarkdownToHtmlRequest
impl Unpin for PostTextMarkdownToHtmlRequest
impl UnsafeUnpin for PostTextMarkdownToHtmlRequest
impl UnwindSafe for PostTextMarkdownToHtmlRequest
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