42 lines
1.2 KiB
Rust
42 lines
1.2 KiB
Rust
// file: kb_decoder_clmm_stabble/src/decoder.rs
|
|
// version: 5
|
|
|
|
//! Decoder scaffold for the `kb_decoder_clmm_stabble` crate.
|
|
|
|
/// Initial decoder implementation placeholder.
|
|
#[derive(Clone, Debug, Default)]
|
|
pub struct ClmmStabbleDecoder;
|
|
|
|
impl kb_decoder_api::ProtocolDecoder for crate::ClmmStabbleDecoder {
|
|
fn decoder_name(&self) -> &'static str {
|
|
return "kb_decoder_clmm_stabble";
|
|
}
|
|
|
|
fn decoder_version(&self) -> &'static str {
|
|
return env!("CARGO_PKG_VERSION");
|
|
}
|
|
|
|
fn program_ids(&self) -> &'static [&'static str] {
|
|
return &[kb_program_ids::CLMM_STABBLE_PROGRAM_ID];
|
|
}
|
|
|
|
fn supports_observation(
|
|
&self,
|
|
observation: &kb_model::ProgramObservation,
|
|
) -> kb_decoder_api::DecoderSupport {
|
|
return if self.handles_program_id(&observation.program_id) {
|
|
kb_decoder_api::DecoderSupport::Maybe
|
|
} else {
|
|
kb_decoder_api::DecoderSupport::No
|
|
};
|
|
}
|
|
|
|
fn decode_observation(
|
|
&self,
|
|
_observation: &kb_model::ProgramObservation,
|
|
) -> kb_core::Result<std::vec::Vec<kb_model::DecodedProtocolEvent>> {
|
|
let _target = crate::TRACING_TARGET;
|
|
return std::result::Result::Ok(std::vec::Vec::new());
|
|
}
|
|
}
|