Skip to main content

NOT_FOUND

Constant NOT_FOUND 

Source
pub const NOT_FOUND: &str = "not_found";
Expand description

The code of an Error::Rejected that says “the broker does not know this”: an order, a cid, an instrument. The same string at every broker, so a caller compares with == and needs no case folding.

§Examples

use brokapi_core::{Error, NOT_FOUND};

let e = Error::not_found("no such order");
assert!(e.is_not_found());
assert!(matches!(&e, Error::Rejected { code, .. } if code == NOT_FOUND));