pub struct TaskToken(pub Vec<u8>);Expand description
Type-safe wrapper for task token bytes
Tuple Fields§
§0: Vec<u8>Implementations§
Source§impl TaskToken
impl TaskToken
Sourcepub fn new_local_activity_token(
unique_data: impl IntoIterator<Item = u8>,
) -> Self
pub fn new_local_activity_token( unique_data: impl IntoIterator<Item = u8>, ) -> Self
Task tokens for local activities are always prefixed with a special sigil so they can be identified easily
Sourcepub fn is_local_activity_task(&self) -> bool
pub fn is_local_activity_task(&self) -> bool
Returns true if the task token is for a local activity
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TaskToken
impl<'de> Deserialize<'de> for TaskToken
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
impl Eq for TaskToken
impl StructuralPartialEq for TaskToken
Auto Trait Implementations§
impl Freeze for TaskToken
impl RefUnwindSafe for TaskToken
impl Send for TaskToken
impl Sync for TaskToken
impl Unpin for TaskToken
impl UnwindSafe for TaskToken
Blanket Implementations§
Source§impl<T> AsJsonPayloadExt for Twhere
T: Serialize,
impl<T> AsJsonPayloadExt for Twhere
T: Serialize,
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> FromJsonPayloadExt for Twhere
T: for<'de> Deserialize<'de>,
impl<T> FromJsonPayloadExt for Twhere
T: for<'de> Deserialize<'de>,
fn from_json_payload(payload: &Payload) -> Result<T, PayloadDeserializeErr>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request