#[non_exhaustive]pub enum TransferKind {
SelfTransfer,
Direct,
Offer,
Unknown,
}Expand description
How a transfer will be carried out, as the registry decides.
Not a caller’s choice: it follows from whether the receiver has pre-approved
direct transfers, and whether sender and receiver are the same party. A
client that assumes Direct and gets Offer has a transfer that is
pending someone else’s acceptance, which is a different workflow.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
SelfTransfer
Sender and receiver are the same party; no approval, usually immediate.
Direct
The receiver has pre-approved direct transfers, so it completes at once.
Offer
The receiver is offered the transfer and it completes only if accepted.
Unknown
A kind this build does not know.
Without this, a registry that adds a fourth kind makes the whole factory
response fail to decode and every transfer stop — including the ones
whose kind is perfectly understood. #[non_exhaustive] promises a
caller their match will keep compiling; this is what makes the promise
reach runtime.
Trait Implementations§
Source§impl Clone for TransferKind
impl Clone for TransferKind
impl Copy for TransferKind
Source§impl Debug for TransferKind
impl Debug for TransferKind
Source§impl<'de> Deserialize<'de> for TransferKind
impl<'de> Deserialize<'de> for TransferKind
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>,
impl Eq for TransferKind
Source§impl PartialEq for TransferKind
impl PartialEq for TransferKind
impl StructuralPartialEq for TransferKind
Auto Trait Implementations§
impl Freeze for TransferKind
impl RefUnwindSafe for TransferKind
impl Send for TransferKind
impl Sync for TransferKind
impl Unpin for TransferKind
impl UnsafeUnpin for TransferKind
impl UnwindSafe for TransferKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
key and return true if they are equal.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>
T in a tonic::Request