pub struct SearchEntry {
pub title: String,
pub url: String,
pub content: String,
}Expand description
Generate a search index entry from HTML content.
§Examples
let entry = ssg_core::SearchEntry {
title: "Hi".to_string(),
url: "/".to_string(),
content: "hello".to_string(),
};
let json = serde_json::to_string(&entry).unwrap();
assert!(json.contains("\"title\":\"Hi\""));Fields§
§title: StringPage title.
url: StringPage URL.
content: StringPlain text content for search matching.
Trait Implementations§
Source§impl Clone for SearchEntry
impl Clone for SearchEntry
Source§fn clone(&self) -> SearchEntry
fn clone(&self) -> SearchEntry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SearchEntry
impl Debug for SearchEntry
Source§impl<'de> Deserialize<'de> for SearchEntry
impl<'de> Deserialize<'de> for SearchEntry
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
Auto Trait Implementations§
impl Freeze for SearchEntry
impl RefUnwindSafe for SearchEntry
impl Send for SearchEntry
impl Sync for SearchEntry
impl Unpin for SearchEntry
impl UnsafeUnpin for SearchEntry
impl UnwindSafe for SearchEntry
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