Struct rabbitmq_stream_client::Client 
source · [−]pub struct Client { /* private fields */ }Expand description
Raw API for taking to RabbitMQ stream
For high level APIs check crate::Environment
Implementations
sourceimpl Client
 
impl Client
pub async fn connect(
    opts: impl Into<ClientOptions>
) -> Result<Client, ClientError>
sourcepub async fn server_properties(&self) -> HashMap<String, String>
 
pub async fn server_properties(&self) -> HashMap<String, String>
Get client’s server properties.
sourcepub async fn connection_properties(&self) -> HashMap<String, String>
 
pub async fn connection_properties(&self) -> HashMap<String, String>
Get client’s connection properties.
pub async fn set_handler<H: MessageHandler>(&self, handler: H)
pub async fn close(&self) -> RabbitMQStreamResult<()>
pub async fn subscribe(
    &self, 
    subscription_id: u8, 
    stream: &str, 
    offset_specification: OffsetSpecification, 
    credit: u16, 
    properties: HashMap<String, String>
) -> RabbitMQStreamResult<GenericResponse>
pub async fn unsubscribe(
    &self, 
    subscription_id: u8
) -> RabbitMQStreamResult<GenericResponse>
pub async fn create_stream(
    &self, 
    stream: &str, 
    options: HashMap<String, String>
) -> RabbitMQStreamResult<GenericResponse>
pub async fn delete_stream(
    &self, 
    stream: &str
) -> RabbitMQStreamResult<GenericResponse>
pub async fn credit(
    &self, 
    subscription_id: u8, 
    credit: u16
) -> RabbitMQStreamResult<()>
pub async fn metadata(
    &self, 
    streams: Vec<String>
) -> RabbitMQStreamResult<HashMap<String, StreamMetadata>>
pub async fn store_offset(
    &self, 
    reference: &str, 
    stream: &str, 
    offset: u64
) -> RabbitMQStreamResult<()>
pub async fn query_offset(
    &self, 
    reference: String, 
    stream: &str
) -> Result<u64, ClientError>
pub async fn declare_publisher(
    &self, 
    publisher_id: u8, 
    publisher_reference: Option<String>, 
    stream: &str
) -> RabbitMQStreamResult<GenericResponse>
pub async fn delete_publisher(
    &self, 
    publisher_id: u8
) -> RabbitMQStreamResult<GenericResponse>
pub async fn publish<T: BaseMessage>(
    &self, 
    publisher_id: u8, 
    messages: impl Into<Vec<T>>
) -> RabbitMQStreamResult<Vec<u64>>
pub async fn query_publisher_sequence(
    &self, 
    reference: &str, 
    stream: &str
) -> Result<u64, ClientError>
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
    T: ?Sized, 
 
impl<T> BorrowMut<T> for T where
    T: ?Sized, 
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
 
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
 
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
 
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
    T: Clone, 
 
impl<T> ToOwned for T where
    T: Clone, 
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
 
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
 
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
    S: Into<Dispatch>, 
 
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
    S: Into<Dispatch>, 
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
 
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more