Hi,
Is there any reason why OwnedMessage does not implement From<String>? Since it is used as a SinkItem of the async client, I can't use the Sink produced by the async client in the following fashion:
pub fn foo<S: Sink>(sink: &mut S)
where
<S as Sink>::SinkItem: From<String>,
<S as Sink>::SinkError: Debug,
{
let text = "ok".to_string();
sink.start_send(text.into()).unwrap();
}
In the current configuration, I am forced to define my own intermediary type which implements From<String> and Into<OwnedMessage>.
Hi, Is there any reason why OwnedMessage does not implement
From<String>
? Since it is used as aSinkItem
of the async client, I can't use theSink
produced by the async client in the following fashion:In the current configuration, I am forced to define my own intermediary type which implements
From<String>
andInto<OwnedMessage>
.Thanks!