Trait longport_httpcli::FromPayload
source · pub trait FromPayload: Sized + Send + Sync + 'static {
type Err: Error;
// Required method
fn parse_from_bytes(data: &[u8]) -> Result<Self, Self::Err>;
}
Expand description
Represents a type that can parse from payload
Required Associated Types§
Required Methods§
sourcefn parse_from_bytes(data: &[u8]) -> Result<Self, Self::Err>
fn parse_from_bytes(data: &[u8]) -> Result<Self, Self::Err>
Parse the payload to this object
Object Safety§
This trait is not object safe.