pub struct Document {
pub data: Map<Thing>,
pub name: String,
pub instructions: Vec<Instruction>,
pub main: Column,
pub aliases: Map<String>,
}
Fields
data: Map<Thing>
name: String
instructions: Vec<Instruction>
main: Column
aliases: Map<String>
Implementations
sourceimpl Document
impl Document
pub fn rerender(&mut self, id: &str, doc_id: &str) -> Result<Document>
pub fn to_rt(&self, id: &str, doc_id: &str) -> Document
pub fn body_events(&self, id: &str) -> String
pub fn html(
&self,
id: &str,
doc_id: &str,
rt_data: &DataDependenciesMap,
collector: &mut Collector
) -> String
pub fn alias(&self, doc: &str) -> Option<&str>
pub fn find<T, F>(children: &[Element], f: &F) -> Option<T> where
F: Fn(&Element) -> Option<T>,
pub fn find_text<T, F>(children: &[Element], f: F) -> Option<T> where
F: Fn(&Text) -> Option<T>,
pub fn get_heading<F>(children: &[Element], f: &F) -> Option<Rendered> where
F: Fn(&Region) -> bool,
pub fn title(&self) -> Option<Rendered>
pub fn get<T: DeserializeOwned>(&self, key: &str) -> Result<T>
pub fn name(&self, k: &str) -> String
pub fn only_instance<T>(&self, record: &str) -> Result<Option<T>> where
T: DeserializeOwned,
pub fn instances<T>(&self, record: &str) -> Result<Vec<T>> where
T: DeserializeOwned,
pub fn json(&self, key: &str) -> Result<Value>
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Document
impl<'de> Deserialize<'de> for Document
sourcefn 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
sourceimpl PartialEq<Document> for Document
impl PartialEq<Document> for Document
impl StructuralPartialEq for Document
Auto Trait Implementations
impl RefUnwindSafe for Document
impl Send for Document
impl Sync for Document
impl Unpin for Document
impl UnwindSafe for Document
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more