pub struct Document<T: Serialize> {
pub meta: Metadata,
pub content: T,
pub code_outputs: HashMap<String, CodeOutput>,
pub data: HashMap<String, Value>,
}
Fields§
§meta: Metadata
§content: T
§code_outputs: HashMap<String, CodeOutput>
§data: HashMap<String, Value>
Implementations§
Trait Implementations§
Source§impl<'de, T> Deserialize<'de> for Document<T>where
T: Deserialize<'de> + Serialize,
impl<'de, T> Deserialize<'de> for Document<T>where
T: Deserialize<'de> + Serialize,
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<T: Send + Sync + Serialize> StructObject for Document<T>
impl<T: Send + Sync + Serialize> StructObject for Document<T>
Source§fn get_field(&self, name: &str) -> Option<Value>
fn get_field(&self, name: &str) -> Option<Value>
Invoked by the engine to get a field of a struct. Read more
Source§fn static_fields(&self) -> Option<&'static [&'static str]>
fn static_fields(&self) -> Option<&'static [&'static str]>
If possible returns a static vector of field names. Read more
Source§fn field_count(&self) -> usize
fn field_count(&self) -> usize
Returns the number of fields. Read more
impl<T: Serialize> StructuralPartialEq for Document<T>
Auto Trait Implementations§
impl<T> Freeze for Document<T>where
T: Freeze,
impl<T> !RefUnwindSafe for Document<T>
impl<T> Send for Document<T>where
T: Send,
impl<T> Sync for Document<T>where
T: Sync,
impl<T> Unpin for Document<T>where
T: Unpin,
impl<T> !UnwindSafe for Document<T>
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