pub struct StorageTableDesc {
pub table_id: u32,
pub columns: Vec<ColumnDesc>,
pub pk: Vec<ColumnOrder>,
pub dist_key_in_pk_indices: Vec<u32>,
pub value_indices: Vec<u32>,
pub read_prefix_len_hint: u32,
pub versioned: bool,
pub stream_key: Vec<u32>,
pub vnode_col_idx_in_pk: Option<u32>,
pub retention_seconds: Option<u32>,
pub maybe_vnode_count: Option<u32>,
}
Fields§
§table_id: u32
§columns: Vec<ColumnDesc>
§pk: Vec<ColumnOrder>
TODO: may refactor primary key representations
dist_key_in_pk_indices: Vec<u32>
§value_indices: Vec<u32>
§read_prefix_len_hint: u32
§versioned: bool
Whether the table is versioned. If true
, column-aware row encoding will
be used to be compatible with schema changes.
stream_key: Vec<u32>
§vnode_col_idx_in_pk: Option<u32>
§retention_seconds: Option<u32>
§maybe_vnode_count: Option<u32>
Total vnode count of the table.
Can be unset if the table is created in older versions where variable vnode count is not
supported, in which case a default value of 256 (or 1 for singleton) should be used.
Use VnodeCountCompat::vnode_count
to access it.
Implementations§
source§impl StorageTableDesc
impl StorageTableDesc
sourcepub fn vnode_col_idx_in_pk(&self) -> u32
pub fn vnode_col_idx_in_pk(&self) -> u32
Returns the value of vnode_col_idx_in_pk
, or the default value if vnode_col_idx_in_pk
is unset.
sourcepub fn retention_seconds(&self) -> u32
pub fn retention_seconds(&self) -> u32
Returns the value of retention_seconds
, or the default value if retention_seconds
is unset.
sourcepub fn maybe_vnode_count(&self) -> u32
pub fn maybe_vnode_count(&self) -> u32
Returns the value of maybe_vnode_count
, or the default value if maybe_vnode_count
is unset.
source§impl StorageTableDesc
impl StorageTableDesc
pub fn get_table_id(&self) -> u32
pub fn get_columns(&self) -> &Vec<ColumnDesc>
pub fn get_pk(&self) -> &Vec<ColumnOrder>
pub fn get_dist_key_in_pk_indices(&self) -> &Vec<u32>
pub fn get_value_indices(&self) -> &Vec<u32>
pub fn get_read_prefix_len_hint(&self) -> u32
pub fn get_versioned(&self) -> bool
pub fn get_stream_key(&self) -> &Vec<u32>
pub fn get_vnode_col_idx_in_pk(&self) -> Result<&u32, PbFieldNotFound>
pub fn get_retention_seconds(&self) -> Result<&u32, PbFieldNotFound>
pub fn get_maybe_vnode_count(&self) -> Result<&u32, PbFieldNotFound>
Trait Implementations§
source§impl Clone for StorageTableDesc
impl Clone for StorageTableDesc
source§fn clone(&self) -> StorageTableDesc
fn clone(&self) -> StorageTableDesc
Returns a copy 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 StorageTableDesc
impl Debug for StorageTableDesc
source§impl Default for StorageTableDesc
impl Default for StorageTableDesc
source§impl<'de> Deserialize<'de> for StorageTableDesc
impl<'de> Deserialize<'de> for StorageTableDesc
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>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Message for StorageTableDesc
impl Message for StorageTableDesc
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 PartialEq for StorageTableDesc
impl PartialEq for StorageTableDesc
source§impl Serialize for StorageTableDesc
impl Serialize for StorageTableDesc
impl StructuralPartialEq for StorageTableDesc
Auto Trait Implementations§
impl Freeze for StorageTableDesc
impl RefUnwindSafe for StorageTableDesc
impl Send for StorageTableDesc
impl Sync for StorageTableDesc
impl Unpin for StorageTableDesc
impl UnwindSafe for StorageTableDesc
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
Mutably borrows from an owned value. Read more
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)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§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>
Wrap the input message
T
in a tonic::Request