pub struct Explanation {
pub original: String,
pub rewritten: String,
pub steps: Vec<ExplainStep>,
}Expand description
A human-inspectable account of what crate::Ddx::rewrite_sql would do to a
statement, produced by crate::Ddx::explain — so a user can see the
derivative SQL before running anything. Inspect the fields directly, or
print the whole thing (Display) for a readable summary.
Fields§
§original: StringThe original statement, unchanged.
rewritten: StringThe statement after every grad/jvp marker is rewritten to derivative
SQL — exactly what crate::Ddx::rewrite_sql returns.
steps: Vec<ExplainStep>One entry per top-level marker, in source order. Empty when the statement
has no marker, or in the rare empty-span reprint fallback (where the
rewrite still appears in Explanation::rewritten).
Trait Implementations§
Source§impl Clone for Explanation
impl Clone for Explanation
Source§fn clone(&self) -> Explanation
fn clone(&self) -> Explanation
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 moreSource§impl Debug for Explanation
impl Debug for Explanation
Auto Trait Implementations§
impl Freeze for Explanation
impl RefUnwindSafe for Explanation
impl Send for Explanation
impl Sync for Explanation
impl Unpin for Explanation
impl UnsafeUnpin for Explanation
impl UnwindSafe for Explanation
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