#[non_exhaustive]pub struct Group {
pub group_uid: u64,
pub tablets: Vec<Tablet>,
pub leader_index: i32,
pub generation: Bytes,
/* private fields */
}Expand description
A Group represents a paxos group in a database. A group is a set of
tablets that are replicated across multiple servers. Groups may have a leader
tablet. Groups store one (or sometimes more) ranges of keys.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.group_uid: u64The UID of the paxos group, unique within the database. Matches the
group_uid field in Range.
tablets: Vec<Tablet>A list of tablets that are part of the group. Note that this list may not be exhaustive; it will only include tablets the server considers useful to the client. The returned list is ordered ascending by distance.
Tablet UIDs reference Tablet.tablet_uid.
leader_index: i32The last known leader tablet of the group as an index into tablets. May
be negative if the group has no known leader.
generation: Bytesgeneration indicates the freshness of the group information (including
leader information) contained in this proto. Generations can be compared
lexicographically; if generation A is greater than generation B, then the
Group corresponding to A is newer than the Group corresponding to B,
and should be used preferentially.
Implementations§
Source§impl Group
impl Group
Sourcepub fn set_group_uid<T: Into<u64>>(self, v: T) -> Self
pub fn set_group_uid<T: Into<u64>>(self, v: T) -> Self
Sets the value of group_uid.
Sourcepub fn set_tablets<T, V>(self, v: T) -> Self
pub fn set_tablets<T, V>(self, v: T) -> Self
Sets the value of tablets.
Sourcepub fn set_leader_index<T: Into<i32>>(self, v: T) -> Self
pub fn set_leader_index<T: Into<i32>>(self, v: T) -> Self
Sets the value of leader_index.
Sourcepub fn set_generation<T: Into<Bytes>>(self, v: T) -> Self
pub fn set_generation<T: Into<Bytes>>(self, v: T) -> Self
Sets the value of generation.
Trait Implementations§
impl StructuralPartialEq for Group
Auto Trait Implementations§
impl !Freeze for Group
impl RefUnwindSafe for Group
impl Send for Group
impl Sync for Group
impl Unpin for Group
impl UnsafeUnpin for Group
impl UnwindSafe for Group
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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