[−][src]Struct asyncnsq::reader::Reader
the reader struct
Fields
stream: Arc<TcpStream>
max_inflight: i32
connected: Arc<Mutex<bool>>
msg_sender: Arc<Sender<Option<Msg>>>
msg_receiver: Receiver<Option<Msg>>
data_bufer: Arc<Mutex<Vec<u8>>>
address: Address
identify_config: String
Methods
impl Reader
[src]
pub async fn reconnect<'_>(&'_ mut self) -> Result<()>
[src]
reconnect of the stream. close the old one and create a new one deal with the msgs which use the old closed stream use new stream to deal with the msg
pub async fn connect<'_>(&'_ mut self) -> Result<()>
[src]
connect a stream
pub async fn sub<'_, '_, '_>(
&'_ self,
nsq_topic: &'_ str,
nsq_channel: &'_ str
) -> Result<()>
[src]
&'_ self,
nsq_topic: &'_ str,
nsq_channel: &'_ str
) -> Result<()>
send sub topic command
Auto Trait Implementations
impl !RefUnwindSafe for Reader
impl Send for Reader
impl Sync for Reader
impl Unpin for Reader
impl !UnwindSafe for Reader
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,