summaryrefslogtreecommitdiffstats
path: root/third_party/rust/neqo-common/src/datagram.rs
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/rust/neqo-common/src/datagram.rs')
-rw-r--r--third_party/rust/neqo-common/src/datagram.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/third_party/rust/neqo-common/src/datagram.rs b/third_party/rust/neqo-common/src/datagram.rs
index 1729c8ed8d..04ba1a45a1 100644
--- a/third_party/rust/neqo-common/src/datagram.rs
+++ b/third_party/rust/neqo-common/src/datagram.rs
@@ -53,6 +53,12 @@ impl Datagram {
pub fn ttl(&self) -> Option<u8> {
self.ttl
}
+
+ #[cfg(feature = "udp")]
+ #[must_use]
+ pub(crate) fn into_data(self) -> Vec<u8> {
+ self.d
+ }
}
impl Deref for Datagram {