pub struct CreateTopicRequest {
pub operation_params: Option<OperationParams>,
pub path: String,
pub partitioning_settings: Option<PartitioningSettings>,
pub retention_period: Option<Duration>,
pub retention_storage_mb: i64,
pub supported_codecs: Option<SupportedCodecs>,
pub partition_write_speed_bytes_per_second: i64,
pub partition_write_burst_bytes: i64,
pub attributes: HashMap<String, String>,
pub consumers: Vec<Consumer>,
pub metering_mode: i32,
}
Expand description
Create topic request sent from client to server.
Fields§
§operation_params: Option<OperationParams>
§path: String
Topic path.
partitioning_settings: Option<PartitioningSettings>
Settings for partitioning
retention_period: Option<Duration>
Retention settings. Currently, only one limit may be set, so other should not be set. How long data in partition should be stored. Must be greater than 0 and less than limit for this database. Default limit - 36 hours.
retention_storage_mb: i64
How much data in partition should be stored. Must be greater than 0 and less than limit for this database. Zero value means infinite limit.
supported_codecs: Option<SupportedCodecs>
List of allowed codecs for writers. Writes with codec not from this list are forbidden. If empty, codec compatibility check for the topic is disabled.
partition_write_speed_bytes_per_second: i64
Partition write speed in bytes per second. Must be less than database limit. Zero value means default limit: 1 MB per second.
partition_write_burst_bytes: i64
Burst size for write in partition, in bytes. Must be less than database limit. Zero value means default limit: 1 MB.
attributes: HashMap<String, String>
User and server attributes of topic. Server attributes starts from “_” and will be validated by server.
consumers: Vec<Consumer>
List of consumers for this topic.
metering_mode: i32
Metering mode for the topic in a serverless database.
Implementations§
Source§impl CreateTopicRequest
impl CreateTopicRequest
Sourcepub fn metering_mode(&self) -> MeteringMode
pub fn metering_mode(&self) -> MeteringMode
Returns the enum value of metering_mode
, or the default if the field is set to an invalid enum value.
Sourcepub fn set_metering_mode(&mut self, value: MeteringMode)
pub fn set_metering_mode(&mut self, value: MeteringMode)
Sets metering_mode
to the provided enum value.
Trait Implementations§
Source§impl Clone for CreateTopicRequest
impl Clone for CreateTopicRequest
Source§fn clone(&self) -> CreateTopicRequest
fn clone(&self) -> CreateTopicRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for CreateTopicRequest
impl Debug for CreateTopicRequest
Source§impl Default for CreateTopicRequest
impl Default for CreateTopicRequest
Source§impl<'de> Deserialize<'de> for CreateTopicRequest
impl<'de> Deserialize<'de> for CreateTopicRequest
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>,
Source§impl Message for CreateTopicRequest
impl Message for CreateTopicRequest
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
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,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
.Source§impl PartialEq for CreateTopicRequest
impl PartialEq for CreateTopicRequest
Source§impl Serialize for CreateTopicRequest
impl Serialize for CreateTopicRequest
impl StructuralPartialEq for CreateTopicRequest
Auto Trait Implementations§
impl Freeze for CreateTopicRequest
impl RefUnwindSafe for CreateTopicRequest
impl Send for CreateTopicRequest
impl Sync for CreateTopicRequest
impl Unpin for CreateTopicRequest
impl UnwindSafe for CreateTopicRequest
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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