Skip to content

Commit 8eabcc1

Browse files
committed
Copy no-export tags to new serialization traits
In 0.2 we added new `LengthLimitedRead` and `LengthReadable` traits, but forgot to copy the no-export tags from the existing `Read` and `Readable` traits. Here we add the missing tags.
1 parent b07111e commit 8eabcc1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lightning/src/util/ser.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,8 @@ impl<'a, R: Read> Read for FixedLengthReader<'a, R> {
229229
}
230230
}
231231

232+
/// This is not exported to bindings users as reads are always from byte arrays, never streams, in
233+
/// bindings.
232234
impl<'a, R: Read> LengthLimitedRead for FixedLengthReader<'a, R> {
233235
#[inline]
234236
fn remaining_bytes(&self) -> u64 {
@@ -350,6 +352,9 @@ where
350352
/// A [`io::Read`] that limits the amount of bytes that can be read. Implementations should ensure
351353
/// that the object being read will only consume a fixed number of bytes from the underlying
352354
/// [`io::Read`], see [`FixedLengthReader`] for an example.
355+
///
356+
/// This is not exported to bindings users as reads are always from byte arrays, never streams, in
357+
/// bindings.
353358
pub trait LengthLimitedRead: Read {
354359
/// The number of bytes remaining to be read.
355360
fn remaining_bytes(&self) -> u64;
@@ -379,6 +384,9 @@ where
379384
///
380385
/// Any type that implements [`Readable`] also automatically has a [`LengthReadable`]
381386
/// implementation, but some types, most notably onion packets, only implement [`LengthReadable`].
387+
///
388+
/// This is not exported to bindings users as reads are always from byte arrays, never streams, in
389+
/// bindings.
382390
pub trait LengthReadable
383391
where
384392
Self: Sized,

0 commit comments

Comments
 (0)