pub struct StatSpec {
pub name: String,
pub sql: String,
pub template: Option<String>,
}Expand description
One custom stats section for opys stats. sql is a single SQL query run
against an in-memory relational view of the corpus (tables docs, tags,
sections, fields — see crate::commands::stats). Without template
the result set renders as a markdown table headed by name; with template,
each result row is rendered through it ({column} placeholders, {{/}} for
literal braces) and the rendered rows are joined under the name heading.
Fields§
§name: String§sql: String§template: Option<String>Trait Implementations§
Source§impl<'de> Deserialize<'de> for StatSpec
impl<'de> Deserialize<'de> for StatSpec
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 StatSpec
impl RefUnwindSafe for StatSpec
impl Send for StatSpec
impl Sync for StatSpec
impl Unpin for StatSpec
impl UnsafeUnpin for StatSpec
impl UnwindSafe for StatSpec
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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<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