diff --git a/src/message.rs b/src/message.rs index ff9861c..7cf1918 100644 --- a/src/message.rs +++ b/src/message.rs @@ -60,6 +60,10 @@ pub struct Req { } impl Req { + pub fn new(v: M) -> Result { + Ok(v.into_req()?) + } + pub fn with_stream_from_buffer(self, b: Bytes) -> Self { Self { stream: AttachedStream::Fixed(b),