pub struct RenderedPrompt { /* private fields */ }Expand description
Immutable output of a complete successful validation. No constructor or deserializer can fabricate checked output. Extracted text is ordinary text; modifying it does not preserve this object’s validation guarantee.
Implementations§
Source§impl RenderedPrompt
impl RenderedPrompt
pub fn text(&self) -> &str
pub fn measurement(&self) -> &TextMeasurement
pub fn report(&self) -> &Report
pub fn spans(&self) -> &[RenderedSpan]
Sourcepub fn section(&self, id: &str) -> Option<&str>
pub fn section(&self, id: &str) -> Option<&str>
Select from an already checked whole document. Ancestor and sibling budgets were validated before any section became available.
pub fn into_text(self) -> String
Trait Implementations§
Source§impl Clone for RenderedPrompt
impl Clone for RenderedPrompt
Source§fn clone(&self) -> RenderedPrompt
fn clone(&self) -> RenderedPrompt
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RenderedPrompt
impl RefUnwindSafe for RenderedPrompt
impl Send for RenderedPrompt
impl Sync for RenderedPrompt
impl Unpin for RenderedPrompt
impl UnsafeUnpin for RenderedPrompt
impl UnwindSafe for RenderedPrompt
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