Struct ic_utils::interfaces::http_request::CallbackStrategy
source · [−]pub struct CallbackStrategy<Token = Token, Callback = HttpRequestStreamingCallback> {
pub callback: Callback,
pub token: Token,
}Expand description
A callback-token pair for a callback streaming strategy.
Fields
callback: CallbackThe callback function to be called to continue the stream.
token: TokenThe token to pass to the function.
Implementations
sourceimpl<T1, C1> CallbackStrategy<T1, C1>
impl<T1, C1> CallbackStrategy<T1, C1>
sourcepub fn from<T2: Into<T1>, C2: Into<C1>>(v: CallbackStrategy<T2, C2>) -> Self
pub fn from<T2: Into<T1>, C2: Into<C1>>(v: CallbackStrategy<T2, C2>) -> Self
Convert another callback strategy
sourcepub fn into<T2, C2>(self) -> CallbackStrategy<T2, C2>where
T1: Into<T2>,
C1: Into<C2>,
pub fn into<T2, C2>(self) -> CallbackStrategy<T2, C2>where
T1: Into<T2>,
C1: Into<C2>,
Convert this callback strategy
Trait Implementations
sourceimpl<Token: CandidType, Callback: CandidType> CandidType for CallbackStrategy<Token, Callback>
impl<Token: CandidType, Callback: CandidType> CandidType for CallbackStrategy<Token, Callback>
sourceimpl<Token: Clone, Callback: Clone> Clone for CallbackStrategy<Token, Callback>
impl<Token: Clone, Callback: Clone> Clone for CallbackStrategy<Token, Callback>
sourcefn clone(&self) -> CallbackStrategy<Token, Callback>
fn clone(&self) -> CallbackStrategy<Token, Callback>
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<Token: Debug, Callback: Debug> Debug for CallbackStrategy<Token, Callback>
impl<Token: Debug, Callback: Debug> Debug for CallbackStrategy<Token, Callback>
sourceimpl<'de, Token, Callback> Deserialize<'de> for CallbackStrategy<Token, Callback>where
Token: Deserialize<'de>,
Callback: Deserialize<'de>,
impl<'de, Token, Callback> Deserialize<'de> for CallbackStrategy<Token, Callback>where
Token: Deserialize<'de>,
Callback: Deserialize<'de>,
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
Auto Trait Implementations
impl<Token, Callback> RefUnwindSafe for CallbackStrategy<Token, Callback>where
Callback: RefUnwindSafe,
Token: RefUnwindSafe,
impl<Token, Callback> Send for CallbackStrategy<Token, Callback>where
Callback: Send,
Token: Send,
impl<Token, Callback> Sync for CallbackStrategy<Token, Callback>where
Callback: Sync,
Token: Sync,
impl<Token, Callback> Unpin for CallbackStrategy<Token, Callback>where
Callback: Unpin,
Token: Unpin,
impl<Token, Callback> UnwindSafe for CallbackStrategy<Token, Callback>where
Callback: UnwindSafe,
Token: UnwindSafe,
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