pub struct QuillValue(/* private fields */);Expand description
Unified value type backed by serde_json::Value.
This type is used throughout Quillmark to represent metadata, fields, and other dynamic values. It provides conversion methods for TOML, YAML, and MiniJinja.
Implementations§
Source§impl QuillValue
impl QuillValue
Source§impl QuillValue
impl QuillValue
Sourcepub fn as_sequence(&self) -> Option<&Vec<Value>>
pub fn as_sequence(&self) -> Option<&Vec<Value>>
Get the value as an array reference (alias for as_array, for YAML compatibility)
Sourcepub fn as_mapping(&self) -> Option<&Map<String, Value>>
pub fn as_mapping(&self) -> Option<&Map<String, Value>>
Get the value as an object reference (alias for as_object, for YAML compatibility)
Sourcepub fn get(&self, key: &str) -> Option<QuillValue>
pub fn get(&self, key: &str) -> Option<QuillValue>
Get a field from an object by key
Trait Implementations§
Source§impl Clone for QuillValue
impl Clone for QuillValue
Source§fn clone(&self) -> QuillValue
fn clone(&self) -> QuillValue
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 QuillValue
impl Debug for QuillValue
Source§impl<'de> Deserialize<'de> for QuillValue
impl<'de> Deserialize<'de> for QuillValue
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 PartialEq for QuillValue
impl PartialEq for QuillValue
Source§impl Serialize for QuillValue
impl Serialize for QuillValue
impl StructuralPartialEq for QuillValue
Auto Trait Implementations§
impl Freeze for QuillValue
impl RefUnwindSafe for QuillValue
impl Send for QuillValue
impl Sync for QuillValue
impl Unpin for QuillValue
impl UnwindSafe for QuillValue
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