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: Callback
The callback function to be called to continue the stream.
token: Token
The token to pass to the function.
Implementations§
source§impl<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>
pub fn into<T2, C2>(self) -> CallbackStrategy<T2, C2>
Convert this callback strategy
sourcepub fn try_from<T2, C2, E>(v: CallbackStrategy<T2, C2>) -> Result<Self, E>
pub fn try_from<T2, C2, E>(v: CallbackStrategy<T2, C2>) -> Result<Self, E>
Attempt to convert another callback strategy
Trait Implementations§
source§impl<Token: CandidType, Callback: CandidType> CandidType for CallbackStrategy<Token, Callback>
impl<Token: CandidType, Callback: CandidType> CandidType for CallbackStrategy<Token, Callback>
source§impl<Token: Clone, Callback: Clone> Clone for CallbackStrategy<Token, Callback>
impl<Token: Clone, Callback: Clone> Clone for CallbackStrategy<Token, Callback>
source§fn clone(&self) -> CallbackStrategy<Token, Callback>
fn clone(&self) -> CallbackStrategy<Token, Callback>
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<'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>,
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
Auto Trait Implementations§
impl<Token, Callback> Freeze for CallbackStrategy<Token, Callback>
impl<Token, Callback> RefUnwindSafe for CallbackStrategy<Token, Callback>where
Callback: RefUnwindSafe,
Token: RefUnwindSafe,
impl<Token, Callback> Send for CallbackStrategy<Token, Callback>
impl<Token, Callback> Sync for CallbackStrategy<Token, Callback>
impl<Token, Callback> Unpin for CallbackStrategy<Token, Callback>
impl<Token, Callback> UnwindSafe for CallbackStrategy<Token, Callback>where
Callback: UnwindSafe,
Token: UnwindSafe,
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