pub struct Parsed {
pub state: Value,
pub model: Option<String>,
pub questions: Vec<(String, Question)>,
pub bars: Vec<(String, f64)>,
pub blocks: Vec<(String, BlockSpan)>,
pub tags: Vec<Tag>,
pub problems: Vec<Problem>,
}Expand description
A parsed sketch. Questions with problems are left out of questions but keep their tags, so
the page still reads sensibly while it is being fixed.
Fields§
§state: Value§model: Option<String>§questions: Vec<(String, Question)>§bars: Vec<(String, f64)>Each question’s bar, from its @threshold or @confidence line.
blocks: Vec<(String, BlockSpan)>Every question that parsed, by name: where it is on the page.
One per line of the input.
problems: Vec<Problem>Implementations§
Source§impl Parsed
impl Parsed
pub fn ok(&self) -> bool
pub fn to_session(&self) -> Session
Sourcepub fn block(&self, name: &str) -> Option<BlockSpan>
pub fn block(&self, name: &str) -> Option<BlockSpan>
Where a question that parsed sits on the page.
Sourcepub fn problem_at(&self, line: usize) -> Option<&Problem>
pub fn problem_at(&self, line: usize) -> Option<&Problem>
The first problem on or after a line — what the status line shows for the cursor.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Parsed
impl RefUnwindSafe for Parsed
impl Send for Parsed
impl Sync for Parsed
impl Unpin for Parsed
impl UnsafeUnpin for Parsed
impl UnwindSafe for Parsed
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more