#[non_exhaustive]pub struct VersionAssignment {
pub object_id: Option<String>,
pub start_version: Option<u64>,
pub version: Option<u64>,
}
Expand description
Object version assignment from consensus.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.object_id: Option<String>
ObjectId
of the object.
start_version: Option<u64>
start version of the consensus stream for this object
version: Option<u64>
Assigned version.
Implementations§
Source§impl VersionAssignment
impl VersionAssignment
pub const OBJECT_ID_FIELD: &'static MessageField
pub const START_VERSION_FIELD: &'static MessageField
pub const VERSION_FIELD: &'static MessageField
Source§impl VersionAssignment
impl VersionAssignment
pub fn path_builder() -> VersionAssignmentFieldPathBuilder
Source§impl VersionAssignment
impl VersionAssignment
pub const fn const_default() -> Self
Sourcepub fn object_id_opt_mut(&mut self) -> Option<&mut String>
pub fn object_id_opt_mut(&mut self) -> Option<&mut String>
Sourcepub fn object_id_mut(&mut self) -> &mut String
pub fn object_id_mut(&mut self) -> &mut String
Returns a mutable reference to object_id
.
If the field is unset, it is first initialized with the default value.
Sourcepub fn object_id_opt(&self) -> Option<&str>
pub fn object_id_opt(&self) -> Option<&str>
Sourcepub fn set_object_id<T: Into<String>>(&mut self, field: T)
pub fn set_object_id<T: Into<String>>(&mut self, field: T)
Sets object_id
with the provided value.
Sourcepub fn with_object_id<T: Into<String>>(self, field: T) -> Self
pub fn with_object_id<T: Into<String>>(self, field: T) -> Self
Sets object_id
with the provided value.
Sourcepub fn start_version_opt_mut(&mut self) -> Option<&mut u64>
pub fn start_version_opt_mut(&mut self) -> Option<&mut u64>
Sourcepub fn start_version_mut(&mut self) -> &mut u64
pub fn start_version_mut(&mut self) -> &mut u64
Returns a mutable reference to start_version
.
If the field is unset, it is first initialized with the default value.
Sourcepub fn start_version_opt(&self) -> Option<u64>
pub fn start_version_opt(&self) -> Option<u64>
Sourcepub fn set_start_version<T: Into<u64>>(&mut self, field: T)
pub fn set_start_version<T: Into<u64>>(&mut self, field: T)
Sets start_version
with the provided value.
Sourcepub fn with_start_version<T: Into<u64>>(self, field: T) -> Self
pub fn with_start_version<T: Into<u64>>(self, field: T) -> Self
Sets start_version
with the provided value.
Sourcepub fn version_opt_mut(&mut self) -> Option<&mut u64>
pub fn version_opt_mut(&mut self) -> Option<&mut u64>
Sourcepub fn version_mut(&mut self) -> &mut u64
pub fn version_mut(&mut self) -> &mut u64
Returns a mutable reference to version
.
If the field is unset, it is first initialized with the default value.
Sourcepub fn version_opt(&self) -> Option<u64>
pub fn version_opt(&self) -> Option<u64>
Sourcepub fn set_version<T: Into<u64>>(&mut self, field: T)
pub fn set_version<T: Into<u64>>(&mut self, field: T)
Sets version
with the provided value.
Sourcepub fn with_version<T: Into<u64>>(self, field: T) -> Self
pub fn with_version<T: Into<u64>>(self, field: T) -> Self
Sets version
with the provided value.
Source§impl VersionAssignment
impl VersionAssignment
Trait Implementations§
Source§impl Clone for VersionAssignment
impl Clone for VersionAssignment
Source§fn clone(&self) -> VersionAssignment
fn clone(&self) -> VersionAssignment
Returns a duplicate 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 Debug for VersionAssignment
impl Debug for VersionAssignment
Source§impl Default for VersionAssignment
impl Default for VersionAssignment
§impl<'de> Deserialize<'de> for VersionAssignment
impl<'de> Deserialize<'de> for VersionAssignment
§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
Source§impl From<VersionAssignment> for VersionAssignment
impl From<VersionAssignment> for VersionAssignment
Source§fn from(value: VersionAssignment) -> Self
fn from(value: VersionAssignment) -> Self
Converts to this type from the input type.
Source§impl From<VersionAssignmentV2> for VersionAssignment
impl From<VersionAssignmentV2> for VersionAssignment
Source§fn from(value: VersionAssignmentV2) -> Self
fn from(value: VersionAssignmentV2) -> Self
Converts to this type from the input type.
Source§impl Message for VersionAssignment
impl Message for VersionAssignment
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self
. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self
.Source§impl MessageFields for VersionAssignment
impl MessageFields for VersionAssignment
const FIELDS: &'static [&'static MessageField]
Source§impl PartialEq for VersionAssignment
impl PartialEq for VersionAssignment
§impl Serialize for VersionAssignment
impl Serialize for VersionAssignment
Source§impl TryFrom<&VersionAssignment> for VersionAssignment
impl TryFrom<&VersionAssignment> for VersionAssignment
Source§type Error = TryFromProtoError
type Error = TryFromProtoError
The type returned in the event of a conversion error.
Source§impl TryFrom<&VersionAssignment> for VersionAssignmentV2
impl TryFrom<&VersionAssignment> for VersionAssignmentV2
Source§type Error = TryFromProtoError
type Error = TryFromProtoError
The type returned in the event of a conversion error.
impl StructuralPartialEq for VersionAssignment
Auto Trait Implementations§
impl Freeze for VersionAssignment
impl RefUnwindSafe for VersionAssignment
impl Send for VersionAssignment
impl Sync for VersionAssignment
impl Unpin for VersionAssignment
impl UnwindSafe for VersionAssignment
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
Casts
self
to type T
. The semantics of numeric casting with the as
operator are followed, so <T as As>::as_::<U>
can be used in the same way as T as U
for numeric conversions. Read moreSource§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,
§impl<T> Conv for T
impl<T> Conv for T
§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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request
§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered
].§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Pipes by value. This is generally the method you want to use. Read more
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
Borrows
self
and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
Mutably borrows
self
and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
Borrows
self
, then passes self.as_ref()
into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
Mutably borrows
self
, then passes self.as_mut()
into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
Borrows
self
, then passes self.deref()
into the pipe function.§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Immutable access to the
Borrow<B>
of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
Mutable access to the
BorrowMut<B>
of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
Immutable access to the
AsRef<R>
view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
Mutable access to the
AsMut<R>
view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Immutable access to the
Deref::Target
of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Mutable access to the
Deref::Target
of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
Calls
.tap()
only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
Calls
.tap_mut()
only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
Calls
.tap_borrow()
only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
Calls
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
Calls
.tap_ref()
only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
Calls
.tap_ref_mut()
only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
Calls
.tap_deref()
only in debug builds, and is erased in release
builds.