Enum ic_cdk::api::management_canister::http_request::TransformType
source · [−]pub enum TransformType {
Function(TransformFunc),
}
Expand description
“transform” reference function type:
opt variant { function: func (http_response) -> (http_response) query }
Variants
Function(TransformFunc)
reference function with signature: func (http_response) -> (http_response) query
Implementations
sourceimpl TransformType
impl TransformType
sourcepub fn from_transform_function<T>(func: T) -> Selfwhere
T: Fn(HttpResponse) -> HttpResponse,
pub fn from_transform_function<T>(func: T) -> Selfwhere
T: Fn(HttpResponse) -> HttpResponse,
Construct TransformType
from a transform function.
example
ⓘ
#[ic_cdk_macros::query]
fn my_transform(arg: HttpResponse) -> HttpResponse {
...
}
let transform = TransformType::from_transform_function(my_transform);
Trait Implementations
sourceimpl CandidType for TransformType
impl CandidType for TransformType
sourceimpl Clone for TransformType
impl Clone for TransformType
sourcefn clone(&self) -> TransformType
fn clone(&self) -> TransformType
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for TransformType
impl Debug for TransformType
sourceimpl<'de> Deserialize<'de> for TransformType
impl<'de> Deserialize<'de> for TransformType
sourcefn 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
sourceimpl PartialEq<TransformType> for TransformType
impl PartialEq<TransformType> for TransformType
sourcefn eq(&self, other: &TransformType) -> bool
fn eq(&self, other: &TransformType) -> bool
impl StructuralPartialEq for TransformType
Auto Trait Implementations
impl RefUnwindSafe for TransformType
impl Send for TransformType
impl Sync for TransformType
impl Unpin for TransformType
impl UnwindSafe for TransformType
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more