pub struct Refusal {
pub code: &'static DoctorCodeDef,
pub message: String,
}Expand description
A refused run: its stable code from the catalogue (crate::codes)
plus the human message, which is exactly what the prose path prints
after fz: .
Fields§
§code: &'static DoctorCodeDefThe catalogue definition this refusal is classified under.
message: StringThe refusal message, exactly as the prose path prints it.
Implementations§
Source§impl Refusal
impl Refusal
Sourcepub fn render_json(&self) -> Result<String, Error>
pub fn render_json(&self) -> Result<String, Error>
The exact stdout payload of a refused fz client-ts --json: one
object, one line, the doctor’s failure shape.
§Errors
Only if serde_json cannot serialize the payload — a struct of
strings and numbers cannot hit that, but the Result keeps every
caller total instead of panicking.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Refusal
impl RefUnwindSafe for Refusal
impl Send for Refusal
impl Sync for Refusal
impl Unpin for Refusal
impl UnsafeUnpin for Refusal
impl UnwindSafe for Refusal
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