Trait sapio_base::simp::SIMP
source · pub trait SIMP {
// Required methods
fn static_get_protocol_number() -> i64
where Self: Sized;
fn get_protocol_number(&self) -> i64;
fn to_json(&self) -> Result<Value, Error>;
fn from_json(value: Value) -> Result<Self, Error>
where Self: Sized;
}
Expand description
Trait for Sapio Interactive Metadata Protocol Implementors
Required Methods§
sourcefn static_get_protocol_number() -> i64where
Self: Sized,
fn static_get_protocol_number() -> i64where
Self: Sized,
Get a protocol number, which should be one that is assigned through the SIMP repo. Proprietary SIMPs can safely use negative numbers.
sourcefn get_protocol_number(&self) -> i64
fn get_protocol_number(&self) -> i64
Get a protocol number, which should be one that is assigned through the SIMP repo. Proprietary SIMPs can safely use negative numbers.
Should be implementd as a pass throught to
Self::static_get_protocol_number
, but the trait system can’t
express that