pub struct DeleteStreamRequest {
pub stream: String,
pub if_exists: bool,
}👎Deprecated since 0.21.1: This crate has been renamed to
s2-sdk. Please update your Cargo.toml to use s2-sdk instead.Expand description
Delete stream request.
Fields§
§stream: String👎Deprecated since 0.21.1: This crate has been renamed to
s2-sdk. Please update your Cargo.toml to use s2-sdk instead.Stream name.
if_exists: bool👎Deprecated since 0.21.1: This crate has been renamed to
s2-sdk. Please update your Cargo.toml to use s2-sdk instead.Delete stream if it exists else do nothing.
Implementations§
Source§impl DeleteStreamRequest
impl DeleteStreamRequest
Sourcepub fn new(stream: impl Into<String>) -> Self
👎Deprecated since 0.21.1: This crate has been renamed to s2-sdk. Please update your Cargo.toml to use s2-sdk instead.
pub fn new(stream: impl Into<String>) -> Self
s2-sdk. Please update your Cargo.toml to use s2-sdk instead.Create a new request.
Examples found in repository?
examples/delete_stream.rs (line 15)
7async fn main() -> Result<(), Box<dyn std::error::Error>> {
8 let token = std::env::var("S2_ACCESS_TOKEN")?;
9 let config = ClientConfig::new(token);
10 let basin: BasinName = "my-favorite-basin".parse()?;
11 let basin_client = BasinClient::new(config, basin);
12
13 let stream = "my-favorite-stream";
14
15 let delete_stream_request = DeleteStreamRequest::new(stream);
16
17 basin_client.delete_stream(delete_stream_request).await?;
18
19 Ok(())
20}Sourcepub fn with_if_exists(self, if_exists: bool) -> Self
👎Deprecated since 0.21.1: This crate has been renamed to s2-sdk. Please update your Cargo.toml to use s2-sdk instead.
pub fn with_if_exists(self, if_exists: bool) -> Self
s2-sdk. Please update your Cargo.toml to use s2-sdk instead.Overwrite the if exists parameter.
Trait Implementations§
Source§impl Clone for DeleteStreamRequest
impl Clone for DeleteStreamRequest
Source§fn clone(&self) -> DeleteStreamRequest
fn clone(&self) -> DeleteStreamRequest
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for DeleteStreamRequest
impl RefUnwindSafe for DeleteStreamRequest
impl Send for DeleteStreamRequest
impl Sync for DeleteStreamRequest
impl Unpin for DeleteStreamRequest
impl UnwindSafe for DeleteStreamRequest
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§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