pub struct TransformContext {
pub function: TransformFunc,
pub context: Vec<u8>,
}👎Deprecated since 0.18.0: The
api::management_canister::http_request module is deprecated. Please use the management_canister module at the crate root.Expand description
Type used for encoding/decoding:
record { function : func (record {response : http_response; context : blob}) -> (http_response) query; context : blob; }
Fields§
§function: TransformFunc👎Deprecated since 0.18.0: The
api::management_canister::http_request module is deprecated. Please use the management_canister module at the crate root.Reference function with signature: func (record {response : http_response; context : blob}) -> (http_response) query;.
context: Vec<u8>👎Deprecated since 0.18.0: The
api::management_canister::http_request module is deprecated. Please use the management_canister module at the crate root.Context to be passed to transform function to transform HTTP response for consensus
Implementations§
Source§impl TransformContext
impl TransformContext
Sourcepub fn from_name(candid_function_name: String, context: Vec<u8>) -> Self
👎Deprecated since 0.18.0: The api::management_canister::http_request module is deprecated. Please use the management_canister module at the crate root.
pub fn from_name(candid_function_name: String, context: Vec<u8>) -> Self
api::management_canister::http_request module is deprecated. Please use the management_canister module at the crate root.Constructs a TransformContext from a name and context. The principal is assumed to be the current canister’s.
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