pub struct TransformContext {
pub function: TransformFunc,
pub context: Vec<u8>,
}
Expand description
Type used for encoding/decoding:
record { function : func (record {response : http_response; context : blob}) -> (http_response) query; context : blob; }
Fields§
§function: TransformFunc
Reference function with signature: func (record {response : http_response; context : blob}) -> (http_response) query;
.
context: Vec<u8>
Context to be passed to transform
function to transform HTTP response for consensus
Implementations§
Trait Implementations§
Source§impl CandidType for TransformContext
impl CandidType for TransformContext
Source§impl Clone for TransformContext
impl Clone for TransformContext
Source§fn clone(&self) -> TransformContext
fn clone(&self) -> TransformContext
Returns a copy of the value. Read more
1.0.0 · 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 TransformContext
impl Debug for TransformContext
Source§impl<'de> Deserialize<'de> for TransformContext
impl<'de> Deserialize<'de> for TransformContext
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 PartialEq for TransformContext
impl PartialEq for TransformContext
impl Eq for TransformContext
impl StructuralPartialEq for TransformContext
Auto Trait Implementations§
impl Freeze for TransformContext
impl RefUnwindSafe for TransformContext
impl Send for TransformContext
impl Sync for TransformContext
impl Unpin for TransformContext
impl UnwindSafe for TransformContext
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,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)