pub struct InlineData {
pub provider: Option<String>,
pub rows: Option<Vec<Value>>,
pub url: Option<String>,
pub endpoint: Option<String>,
pub cache: Option<CacheConfig>,
pub datasource: Option<String>,
pub query: Option<String>,
}Expand description
Inline / single-source data descriptor. Every field is optional so the struct
matches all of JS chartml’s reserved-key shapes: rows-based inline data,
url-based HTTP, provider-based plugin, and datasource+query-based
slug references.
deny_unknown_fields is critical: the untagged DataRef enum tries
Inline before NamedMap, and without the deny-unknown guard a
named-source map like { visitors: {...}, revenue: {...} } would silently
deserialize into InlineData with every field set to None, masking the
real shape.
Fields§
§provider: Option<String>§rows: Option<Vec<Value>>§url: Option<String>§endpoint: Option<String>§cache: Option<CacheConfig>§datasource: Option<String>Slug-based datasource reference (resolved at runtime by the host app).
query: Option<String>SQL query string for slug-based datasources.
Trait Implementations§
Source§impl Clone for InlineData
impl Clone for InlineData
Source§fn clone(&self) -> InlineData
fn clone(&self) -> InlineData
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 Debug for InlineData
impl Debug for InlineData
Source§impl<'de> Deserialize<'de> for InlineData
impl<'de> Deserialize<'de> for InlineData
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 InlineData
impl RefUnwindSafe for InlineData
impl Send for InlineData
impl Sync for InlineData
impl Unpin for InlineData
impl UnsafeUnpin for InlineData
impl UnwindSafe for InlineData
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