#[repr(i32)]pub enum DispatcherType {
Unspecified = 0,
Hash = 1,
Broadcast = 2,
Simple = 3,
NoShuffle = 4,
}
Variants§
Unspecified = 0
Hash = 1
Dispatch by hash key, hashed by consistent hash.
Broadcast = 2
Broadcast to all downstreams.
Note a broadcast cannot be represented as multiple simple dispatchers, since they are different when we update dispatchers during scaling.
Simple = 3
Only one downstream.
NoShuffle = 4
A special kind of exchange that doesn’t involve shuffle. The upstream actor will be directly piped into the downstream actor, if there are the same number of actors. If number of actors are not the same, should use hash instead. Should be only used when distribution is the same.
Implementations§
source§impl DispatcherType
impl DispatcherType
sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
source§impl Clone for DispatcherType
impl Clone for DispatcherType
source§fn clone(&self) -> DispatcherType
fn clone(&self) -> DispatcherType
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for DispatcherType
impl Debug for DispatcherType
source§impl Default for DispatcherType
impl Default for DispatcherType
source§fn default() -> DispatcherType
fn default() -> DispatcherType
source§impl<'de> Deserialize<'de> for DispatcherType
impl<'de> Deserialize<'de> for DispatcherType
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>,
source§impl From<DispatcherType> for i32
impl From<DispatcherType> for i32
source§fn from(value: DispatcherType) -> i32
fn from(value: DispatcherType) -> i32
source§impl Hash for DispatcherType
impl Hash for DispatcherType
source§impl Ord for DispatcherType
impl Ord for DispatcherType
source§fn cmp(&self, other: &DispatcherType) -> Ordering
fn cmp(&self, other: &DispatcherType) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for DispatcherType
impl PartialEq for DispatcherType
source§impl PartialOrd for DispatcherType
impl PartialOrd for DispatcherType
source§impl Serialize for DispatcherType
impl Serialize for DispatcherType
source§impl TryFrom<i32> for DispatcherType
impl TryFrom<i32> for DispatcherType
source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
source§fn try_from(value: i32) -> Result<DispatcherType, UnknownEnumValue>
fn try_from(value: i32) -> Result<DispatcherType, UnknownEnumValue>
impl Copy for DispatcherType
impl Eq for DispatcherType
impl StructuralPartialEq for DispatcherType
Auto Trait Implementations§
impl Freeze for DispatcherType
impl RefUnwindSafe for DispatcherType
impl Send for DispatcherType
impl Sync for DispatcherType
impl Unpin for DispatcherType
impl UnwindSafe for DispatcherType
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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.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.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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