pub struct CardReader<'a> { /* private fields */ }Expand description
A single composable card bound to its CardSchema, from
TypedReader::card. Same get / body_markdown verbs as TypedReader,
reading the card at its bound index.
Implementations§
Source§impl CardReader<'_>
impl CardReader<'_>
Sourcepub fn get(&self, name: &str) -> Result<Option<ReadValue>, EditError>
pub fn get(&self, name: &str) -> Result<Option<ReadValue>, EditError>
Read a field on this card, interpreted by its declared type: the card
twin of TypedReader::get. Resolves the field against the card’s
CardSchema; a name the schema does not declare (or any name when the
card kind is unknown) reads with EditError::UnknownField.
Sourcepub fn get_content(&self, name: &str) -> Result<Option<Content>, EditError>
pub fn get_content(&self, name: &str) -> Result<Option<Content>, EditError>
Read a content field on this card as its Content: the card twin
of TypedReader::get_content, carrying the same outcomes.
Sourcepub fn body_markdown(&self) -> String
pub fn body_markdown(&self) -> String
This card’s body markdown: the card twin of TypedReader::body_markdown,
quill-free and never raising.
Auto Trait Implementations§
impl<'a> Freeze for CardReader<'a>
impl<'a> RefUnwindSafe for CardReader<'a>
impl<'a> Send for CardReader<'a>
impl<'a> Sync for CardReader<'a>
impl<'a> Unpin for CardReader<'a>
impl<'a> UnsafeUnpin for CardReader<'a>
impl<'a> UnwindSafe for CardReader<'a>
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