#[non_exhaustive]pub struct Range {
pub start_key: Bytes,
pub limit_key: Bytes,
pub group_uid: u64,
pub split_id: u64,
pub generation: Bytes,
/* private fields */
}Expand description
A Range represents a range of keys in a database. The keys themselves
are encoded in “sortable string format”, also known as ssformat. Consult
Spanner’s open source client libraries for details on the encoding.
Each range represents a contiguous range of rows, possibly from multiple
tables/indexes. Each range is associated with a single paxos group (known as
a “group” throughout this API), a split (which names the exact range within
the group), and a generation that can be used to determine whether a given
Range represents a newer or older location for the key range.
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.start_key: BytesThe start key of the range, inclusive. Encoded in “sortable string format” (ssformat).
limit_key: BytesThe limit key of the range, exclusive. Encoded in “sortable string format” (ssformat).
group_uid: u64The UID of the paxos group where this range is stored. UIDs are unique
within the database. References Group.group_uid.
split_id: u64A group can store multiple ranges of keys. Each key range is named by an
ID (the split ID). Within a group, split IDs are unique. The split_id
names the exact split in group_uid where this range is stored.
generation: Bytesgeneration indicates the freshness of the range information contained
in this proto. Generations can be compared lexicographically; if generation
A is greater than generation B, then the Range corresponding to A is
newer than the Range corresponding to B, and should be used
preferentially.
Implementations§
Source§impl Range
impl Range
Sourcepub fn set_start_key<T: Into<Bytes>>(self, v: T) -> Self
pub fn set_start_key<T: Into<Bytes>>(self, v: T) -> Self
Sets the value of start_key.
Sourcepub fn set_limit_key<T: Into<Bytes>>(self, v: T) -> Self
pub fn set_limit_key<T: Into<Bytes>>(self, v: T) -> Self
Sets the value of limit_key.
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_split_id<T: Into<u64>>(self, v: T) -> Self
pub fn set_split_id<T: Into<u64>>(self, v: T) -> Self
Sets the value of split_id.
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 Range
Auto Trait Implementations§
impl !Freeze for Range
impl RefUnwindSafe for Range
impl Send for Range
impl Sync for Range
impl Unpin for Range
impl UnsafeUnpin for Range
impl UnwindSafe for Range
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