#[non_exhaustive]pub enum ReturnFormat {
Raw,
Markdown,
Commonmark,
Text,
Xml,
Bytes,
Empty,
}Expand description
The shape the page content is returned in.
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.
Raw
The page as fetched, markup and all. The API’s own default, and the most expensive thing to hand to a model.
Markdown
Markdown. Keeps headings, lists and links, and drops most of the bytes.
Commonmark
Markdown restricted to the CommonMark spec, for readers that reject the extensions.
Text
Plain text with the markup taken out.
Xml
XML.
Bytes
The bytes exactly as received, for files that are not pages.
Empty
No content at all. Pair it with an extraction map or with metadata to get the few fields you want and none of the page.
Implementations§
Trait Implementations§
Source§impl Clone for ReturnFormat
impl Clone for ReturnFormat
impl Copy for ReturnFormat
Source§impl Debug for ReturnFormat
impl Debug for ReturnFormat
Source§impl Default for ReturnFormat
impl Default for ReturnFormat
Source§impl<'de> Deserialize<'de> for ReturnFormat
impl<'de> Deserialize<'de> for ReturnFormat
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 Display for ReturnFormat
impl Display for ReturnFormat
impl Eq for ReturnFormat
Source§impl From<ReturnFormat> for ReturnFormatHandling
impl From<ReturnFormat> for ReturnFormatHandling
Source§fn from(value: ReturnFormat) -> ReturnFormatHandling
fn from(value: ReturnFormat) -> ReturnFormatHandling
Converts to this type from the input type.
Source§impl Hash for ReturnFormat
impl Hash for ReturnFormat
Source§impl Ord for ReturnFormat
impl Ord for ReturnFormat
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for ReturnFormat
impl PartialEq for ReturnFormat
Source§impl PartialOrd for ReturnFormat
impl PartialOrd for ReturnFormat
Source§impl Serialize for ReturnFormat
impl Serialize for ReturnFormat
impl StructuralPartialEq for ReturnFormat
Auto Trait Implementations§
impl Forget for ReturnFormat
impl Freeze for ReturnFormat
impl Move for ReturnFormat
impl RefUnwindSafe for ReturnFormat
impl Send for ReturnFormat
impl Sync for ReturnFormat
impl Unpin for ReturnFormat
impl UnsafeUnpin for ReturnFormat
impl UnwindSafe for ReturnFormat
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