pub struct TopicBuilder { /* private fields */ }Expand description
Topic builder for fluent topic creation.
Implementations§
Source§impl TopicBuilder
impl TopicBuilder
Sourcepub fn new(project_id: impl Into<String>, topic_name: impl Into<String>) -> Self
pub fn new(project_id: impl Into<String>, topic_name: impl Into<String>) -> Self
Creates a new topic builder.
Sourcepub fn message_retention(self, seconds: i64) -> Self
pub fn message_retention(self, seconds: i64) -> Self
Sets message retention duration.
Sourcepub fn message_ordering(self, enable: bool) -> Self
pub fn message_ordering(self, enable: bool) -> Self
Enables message ordering.
Sourcepub fn build(self) -> TopicConfig
pub fn build(self) -> TopicConfig
Builds the topic configuration.
Sourcepub async fn create(self, manager: &TopicManager) -> Result<String>
pub async fn create(self, manager: &TopicManager) -> Result<String>
Creates the topic using a topic manager.
Auto Trait Implementations§
impl Freeze for TopicBuilder
impl RefUnwindSafe for TopicBuilder
impl Send for TopicBuilder
impl Sync for TopicBuilder
impl Unpin for TopicBuilder
impl UnsafeUnpin for TopicBuilder
impl UnwindSafe for TopicBuilder
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> 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>
Wrap the input message
T in a tonic::Request