Makes Features::from_be_bytes public
[rust-lightning] / lightning / src / ln / features.rs
index bcaa91ab266fe7f10ebbc8de710fc30d927365c3..d10c3a71927b254854fd11869f1d9cbaedf7cb35 100644 (file)
@@ -718,7 +718,11 @@ impl<T: sealed::Context> Features<T> {
                Ok(())
        }
 
-       fn from_be_bytes(mut flags: Vec<u8>) -> Features<T> {
+       /// Create a [`Features`] given a set of flags, in big-endian. This is in byte order from
+       /// most on-the-wire encodings.
+       ///
+       /// This is not exported to bindings users as we don't support export across multiple T
+       pub fn from_be_bytes(mut flags: Vec<u8>) -> Features<T> {
                flags.reverse(); // Swap to little-endian
                Self {
                        flags,