pub fn require_native(id: &InstrumentId) -> Result<(), Error>Expand description
Refuses an [InstrumentId] whose [NativeId] is of another broker’s kind (SymbolMic is the Finam
form), before anything is sent.
§Errors
[Error::Config]: T-Bank takes a uid, a figi, or a ticker with a class code.
§Examples
use brokapi_core::{Error, InstrumentId, InstrumentKey, NativeId};
use brokapi_tbank::ids::require_native;
let finam = InstrumentId::new(
InstrumentKey::new("SBER", "MISX"),
NativeId::SymbolMic { symbol: "SBER".into(), mic: "MISX".into() },
);
assert!(matches!(require_native(&finam), Err(Error::Config(_))));