pub trait Decoder {
// Required methods
fn decode_account<V>(&self, visitor: V) -> Result<V::Value, DecodeError>
where V: Visitor;
fn decode_transaction<V>(&self, visitor: V) -> Result<V::Value, DecodeError>
where V: Visitor;
fn decode_anchor_cpi_events<V>(
&self,
visitor: V,
) -> Result<V::Value, DecodeError>
where V: Visitor;
fn decode_owned_data<V>(&self, visitor: V) -> Result<V::Value, DecodeError>
where V: Visitor;
fn decode_bytes<V>(&self, visitor: V) -> Result<V::Value, DecodeError>
where V: Visitor;
}
Expand description
Decoder for received program data.
Required Methods§
Sourcefn decode_account<V>(&self, visitor: V) -> Result<V::Value, DecodeError>where
V: Visitor,
fn decode_account<V>(&self, visitor: V) -> Result<V::Value, DecodeError>where
V: Visitor,
Hint that the visitor is expecting an AccountInfo
.
Sourcefn decode_transaction<V>(&self, visitor: V) -> Result<V::Value, DecodeError>where
V: Visitor,
fn decode_transaction<V>(&self, visitor: V) -> Result<V::Value, DecodeError>where
V: Visitor,
Hint that the visitor is expecting a Transaction
.
Sourcefn decode_anchor_cpi_events<V>(
&self,
visitor: V,
) -> Result<V::Value, DecodeError>where
V: Visitor,
fn decode_anchor_cpi_events<V>(
&self,
visitor: V,
) -> Result<V::Value, DecodeError>where
V: Visitor,
Hint that the visitor is expecting AnchorCPIEvent
list.
Sourcefn decode_owned_data<V>(&self, visitor: V) -> Result<V::Value, DecodeError>where
V: Visitor,
fn decode_owned_data<V>(&self, visitor: V) -> Result<V::Value, DecodeError>where
V: Visitor,
Hint that the visitor is expecting a OwnedData
.
It can be the data of an Event
of an Instruction
.
Sourcefn decode_bytes<V>(&self, visitor: V) -> Result<V::Value, DecodeError>where
V: Visitor,
fn decode_bytes<V>(&self, visitor: V) -> Result<V::Value, DecodeError>where
V: Visitor,
Hint that the visitor is expecting a Data
.
It can be the data of an Event
of an Instruction
.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.