pub struct RecentShortcode {
pub since: Option<String>,
pub last: Option<String>,
pub count: Option<u32>,
pub fallback_markdown: String,
}Expand description
Arguments for Shortcode::Recent.
Parameters parsed at shortcode-extract time; the query runs at render
time against the full post set. Renderer lives in
src-tauri/src/build/markdown/recent.rs.
Fields§
§since: Option<String>since="YYYY-MM-DD" — posts on or after this date. Stored as the
raw string here; the rendering layer parses it into a DateTime.
Mutually compatible with last — both set the cutoff, later wins.
last: Option<String>last="week" | "month" | "Nd" — relative window. The renderer
converts this to a duration and subtracts from now.
count: Option<u32>count="N" — cap at N most recent posts. The renderer applies a
default of 10 when unset.
fallback_markdown: StringBody content rendered as fallback when zero posts match. Empty string means no fallback. Lives in the AST so the renderer doesn’t need to re-read the source.
Trait Implementations§
Source§impl Clone for RecentShortcode
impl Clone for RecentShortcode
Source§fn clone(&self) -> RecentShortcode
fn clone(&self) -> RecentShortcode
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 RecentShortcode
impl Debug for RecentShortcode
Source§impl Default for RecentShortcode
impl Default for RecentShortcode
Source§fn default() -> RecentShortcode
fn default() -> RecentShortcode
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RecentShortcode
impl<'de> Deserialize<'de> for RecentShortcode
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
impl Eq for RecentShortcode
Source§impl PartialEq for RecentShortcode
impl PartialEq for RecentShortcode
Source§impl Serialize for RecentShortcode
impl Serialize for RecentShortcode
impl StructuralPartialEq for RecentShortcode
Auto Trait Implementations§
impl Freeze for RecentShortcode
impl RefUnwindSafe for RecentShortcode
impl Send for RecentShortcode
impl Sync for RecentShortcode
impl Unpin for RecentShortcode
impl UnsafeUnpin for RecentShortcode
impl UnwindSafe for RecentShortcode
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.