Trait TryFromBlockResponse
pub trait TryFromBlockResponse<N>where
N: Network,{
type Error: Error + Send + Sync + Unpin;
// Required method
fn from_block_response(
block_response: <N as Network>::BlockResponse,
) -> Result<Self, Self::Error>
where Self: Sized;
}
Expand description
Trait for converting network block responses to primitive block types.
Required Associated Types§
Required Methods§
fn from_block_response(
block_response: <N as Network>::BlockResponse,
) -> Result<Self, Self::Error>where
Self: Sized,
fn from_block_response(
block_response: <N as Network>::BlockResponse,
) -> Result<Self, Self::Error>where
Self: Sized,
Converts a network block response to a primitive block type.
§Returns
Returns Ok(Self)
on successful conversion, or Err(Self::Error)
if the conversion fails.