pub fn publish(&self, cmd: PubCommand) -> impl Future<Item = (), Error = NatsError> + Send + Sync {
        if let Some(ref server_info) = *self.server_info.read() {
            if cmd.payload.len() > server_info.max_payload as usize {
                return Either::A(future::err(NatsError::MaxPayloadOverflow(server_info.max_payload)));
            }
        }

        Either::B(self.tx.send(Op::PUB(cmd)))
    }
/// Send a PUB command to the server
///
/// Returns `impl Future<Item = (), Error = NatsError>`
Send a PUB command to the server
Returns `impl Future`
Send a PUB command to the server Returns ` impl Future `
pub fn publish(&self, cmd: PubCommand) -> impl Future<Item = (), Error = NatsError> + Send + Sync {
        if let Some(ref server_info) = *self.server_info.read() {
            if cmd.payload.len() > server_info.max_payload as usize {
                return Either::A(future::err(NatsError::MaxPayloadOverflow(server_info.max_payload)));
            }
        }
        Either::B(self.tx.send(Op::PUB(cmd)))
    }
pub fn publish ( & self , cmd : PubCommand ) -> impl Future < Item = ( ) , Error = NatsError > + Send + Sync { if let Some ( ref server_info ) = * self . server_info . read ( ) { if cmd . payload . len ( ) > server_info . max_payload as usize { return Either :: A ( future :: err ( NatsError :: MaxPayloadOverflow ( server_info . max_payload ) ) ) ; } } Either :: B ( self . tx . send ( Op :: PUB ( cmd ) ) ) }
Send a PUB command to the server
Returns `impl Future<Item = (), Error = NatsError>`
Send a PUB command to the server Returns ` impl Future<Item = () Error = NatsError > `
&self
cmd
PubCommand
&self
cmd
PubCommand