Trait EntryValue

Source
pub trait EntryValue {
    // Required methods
    fn bytes(&self) -> Vec<u8> ;
    fn from_ivec(value: IVec) -> Self
       where Self: Sized;
    fn url(&self) -> String;
    fn response(&self) -> Cow<'_, [u8]>;
    fn set_response(&mut self, response: &[u8]);
    fn is_same(&self, other: &Self) -> bool
       where Self: Sized;

    // Provided method
    fn from_bytes(value: &[u8]) -> Self
       where Self: Sized { ... }
}

Required Methods§

Source

fn bytes(&self) -> Vec<u8>

Convert the value to bytes

Source

fn from_ivec(value: IVec) -> Self
where Self: Sized,

Convert the value from IVec

Source

fn url(&self) -> String

Return the url to send the request

Source

fn response(&self) -> Cow<'_, [u8]>

Return the response as a Copy on Write byte array

Source

fn set_response(&mut self, response: &[u8])

Set the response from the request as a byte array

Source

fn is_same(&self, other: &Self) -> bool
where Self: Sized,

Check if the value is the same as another value (excluding the response)

Provided Methods§

Source

fn from_bytes(value: &[u8]) -> Self
where Self: Sized,

Implementors§