pub struct Verifier { /* private fields */ }Expand description
Command-JSON handle carrying the comparison tolerances. Holds no other state, but is handle-shaped so the ten language bindings share the same surface as screener/proof/terminal.
Implementations§
Source§impl Verifier
impl Verifier
Sourcepub fn new(config_json: &str) -> Result<Self>
pub fn new(config_json: &str) -> Result<Self>
Build a verifier from a Config JSON string ({"atol":..,"rtol":..}).
Missing fields fall back to the defaults.
Sourcepub fn verify(
&self,
claim: &Claim,
data: &BTreeMap<String, Vec<Candle>>,
) -> Result<Verdict>
pub fn verify( &self, claim: &Claim, data: &BTreeMap<String, Vec<Candle>>, ) -> Result<Verdict>
Verify a claim against candle data with this verifier’s tolerances.
Sourcepub fn command_json(&self, cmd_json: &str) -> Result<String>
pub fn command_json(&self, cmd_json: &str) -> Result<String>
Dispatch a command envelope {"cmd": ...} and return a canonical JSON
string. Unknown commands and errors return an error envelope, never a
panic.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Verifier
impl RefUnwindSafe for Verifier
impl Send for Verifier
impl Sync for Verifier
impl Unpin for Verifier
impl UnsafeUnpin for Verifier
impl UnwindSafe for Verifier
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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