We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0a509e6 + f0441f7 commit 874e986Copy full SHA for 874e986
src/proto/message/unparsed.rs
@@ -16,6 +16,11 @@ impl Unparsed {
16
let mut v = &self.0[..];
17
T::decode(&mut v)
18
}
19
+
20
+ /// Obtain the unparsed bytes as a `Vec<u8>`, consuming the `Unparsed`
21
+ pub fn into_bytes(self) -> Vec<u8> {
22
+ self.0
23
+ }
24
25
26
impl From<Vec<u8>> for Unparsed {
@@ -24,6 +29,12 @@ impl From<Vec<u8>> for Unparsed {
29
30
31
32
+impl AsRef<[u8]> for Unparsed {
33
+ fn as_ref(&self) -> &[u8] {
34
+ self.0.as_ref()
35
36
+}
37
27
38
impl Encode for Unparsed {
28
39
fn encoded_len(&self) -> ssh_encoding::Result<usize> {
40
Ok(self.0.len())
0 commit comments