#[repr(i32)]pub enum TargetChangeType {
NoChange = 0,
Add = 1,
Remove = 2,
Current = 3,
Reset = 4,
}
Expand description
The type of change.
Variants§
NoChange = 0
No change has occurred. Used only to send an updated resume_token
.
Add = 1
The targets have been added.
Remove = 2
The targets have been removed.
Current = 3
The targets reflect all changes committed before the targets were added to the stream.
This will be sent after or with a read_time
that is greater than or
equal to the time at which the targets were added.
Listeners can wait for this change if read-after-write semantics are desired.
Reset = 4
The targets have been reset, and a new initial state for the targets will be returned in subsequent changes.
After the initial state is complete, CURRENT
will be returned even
if the target was previously indicated to be CURRENT
.
Implementations§
source§impl TargetChangeType
impl TargetChangeType
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 TargetChangeType
impl Clone for TargetChangeType
source§fn clone(&self) -> TargetChangeType
fn clone(&self) -> TargetChangeType
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for TargetChangeType
impl Debug for TargetChangeType
source§impl Default for TargetChangeType
impl Default for TargetChangeType
source§fn default() -> TargetChangeType
fn default() -> TargetChangeType
source§impl From<TargetChangeType> for i32
impl From<TargetChangeType> for i32
source§fn from(value: TargetChangeType) -> i32
fn from(value: TargetChangeType) -> i32
source§impl Hash for TargetChangeType
impl Hash for TargetChangeType
source§impl Ord for TargetChangeType
impl Ord for TargetChangeType
source§fn cmp(&self, other: &TargetChangeType) -> Ordering
fn cmp(&self, other: &TargetChangeType) -> 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 TargetChangeType
impl PartialEq for TargetChangeType
source§fn eq(&self, other: &TargetChangeType) -> bool
fn eq(&self, other: &TargetChangeType) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for TargetChangeType
impl PartialOrd for TargetChangeType
source§fn partial_cmp(&self, other: &TargetChangeType) -> Option<Ordering>
fn partial_cmp(&self, other: &TargetChangeType) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl TryFrom<i32> for TargetChangeType
impl TryFrom<i32> for TargetChangeType
§type Error = DecodeError
type Error = DecodeError
source§fn try_from(value: i32) -> Result<TargetChangeType, DecodeError>
fn try_from(value: i32) -> Result<TargetChangeType, DecodeError>
impl Copy for TargetChangeType
impl Eq for TargetChangeType
impl StructuralPartialEq for TargetChangeType
Auto Trait Implementations§
impl Freeze for TargetChangeType
impl RefUnwindSafe for TargetChangeType
impl Send for TargetChangeType
impl Sync for TargetChangeType
impl Unpin for TargetChangeType
impl UnwindSafe for TargetChangeType
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
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<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.§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.§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