pub struct RexUpdate { /* private fields */ }Expand description
REX update structure
Implementations§
Source§impl RexUpdate
impl RexUpdate
pub fn new(data: Vec<u8>, validator: AuthorityKeyBytes) -> Self
Sourcepub fn data(&self) -> &[u8] ⓘ
pub fn data(&self) -> &[u8] ⓘ
Returns the REX data as a Base64 encoded string
§Returns
The output that resulted from the REX Duty being performed, serialized as bytes with Borsh
Sourcepub fn validator(&self) -> AuthorityKeyBytes
pub fn validator(&self) -> AuthorityKeyBytes
The 96-byte BLS12-381 authority public key of the validator.
Sourcepub fn try_data_as_output(&self) -> Result<RexOutput, RexProcessorError>
pub fn try_data_as_output(&self) -> Result<RexOutput, RexProcessorError>
Sourcepub fn success_payload(&self) -> Option<RexData>
pub fn success_payload(&self) -> Option<RexData>
Returns the RexData payload returned by the rex if the request was a success.
Otherwise, returns None.
§Returns
An Option containing the RexData payload if the rex output was a success, or None otherwise.
pub fn get_rex_response_timestamp(&self) -> Option<String>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RexUpdate
impl<'de> Deserialize<'de> for RexUpdate
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
Source§impl HumanReadable for RexUpdate
impl HumanReadable for RexUpdate
Source§fn human_readable(&self) -> String
fn human_readable(&self) -> String
Return a human-readable string representation
impl Representable for RexUpdate
impl StructuralPartialEq for RexUpdate
Auto Trait Implementations§
impl Freeze for RexUpdate
impl RefUnwindSafe for RexUpdate
impl Send for RexUpdate
impl Sync for RexUpdate
impl Unpin for RexUpdate
impl UnsafeUnpin for RexUpdate
impl UnwindSafe for RexUpdate
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