pub struct RexResponse {
pub response: RexData,
pub timestamp: String,
}Expand description
The response received from REX.
This data structure is used to represent the successful output of a REX request.
Fields§
§response: RexDataThe raw response data from the REX execution, encoded as bytes.
timestamp: StringThe timestamp when the REX response was generated.
Implementations§
Source§impl RexResponse
impl RexResponse
Sourcepub fn new(response: RexData) -> Self
pub fn new(response: RexData) -> Self
Creates a new RexResponse with the given response data and timestamp.
Sourcepub fn into_successful_responses(self) -> Vec<Vec<u8>>
pub fn into_successful_responses(self) -> Vec<Vec<u8>>
Convert to successful response data. In case of RexData::Raw returns a vector of one
element containing the raw bytes. In case of RexData::Filtered returns a vector of all
successful filtered bytes.
If there are no successful responses, returns an empty vector.
Trait Implementations§
Source§impl BorshDeserialize for RexResponse
impl BorshDeserialize for RexResponse
fn deserialize_reader<__R: Read>(reader: &mut __R) -> Result<Self, Error>
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl BorshSerialize for RexResponse
impl BorshSerialize for RexResponse
Source§impl Clone for RexResponse
impl Clone for RexResponse
Source§fn clone(&self) -> RexResponse
fn clone(&self) -> RexResponse
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RexResponse
impl Debug for RexResponse
Source§impl<'de> Deserialize<'de> for RexResponse
impl<'de> Deserialize<'de> for RexResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for RexResponse
Source§impl HumanReadable for RexResponse
impl HumanReadable for RexResponse
Source§fn human_readable(&self) -> String
fn human_readable(&self) -> String
Return a human-readable string representation
Source§impl PartialEq for RexResponse
impl PartialEq for RexResponse
Source§fn eq(&self, other: &RexResponse) -> bool
fn eq(&self, other: &RexResponse) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Representable for RexResponse
Source§impl Serialize for RexResponse
impl Serialize for RexResponse
impl StructuralPartialEq for RexResponse
Auto Trait Implementations§
impl Freeze for RexResponse
impl RefUnwindSafe for RexResponse
impl Send for RexResponse
impl Sync for RexResponse
impl Unpin for RexResponse
impl UnsafeUnpin for RexResponse
impl UnwindSafe for RexResponse
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.