X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Futil%2Fser.rs;h=961d4f1020073f8d76553374ef0cec394e217828;hb=ebb8d2d69f90af3bbd964ede19031850de23b4fd;hp=a8c3d5621a9b343ddf4211df31506222d8f74b41;hpb=22a0dd5f339058fd6733920ffca0f5eb64db4e32;p=rust-lightning diff --git a/lightning/src/util/ser.rs b/lightning/src/util/ser.rs index a8c3d562..961d4f10 100644 --- a/lightning/src/util/ser.rs +++ b/lightning/src/util/ser.rs @@ -37,6 +37,8 @@ const MAX_BUF_SIZE: usize = 64 * 1024; /// buffers being written into. /// An impl is provided for any type that also impls std::io::Write which simply ignores size /// hints. +/// +/// (C-not exported) as we only export serialization to/from byte arrays instead pub trait Writer { /// Writes the given buf out. See std::io::Write::write_all for more fn write_all(&mut self, buf: &[u8]) -> Result<(), ::std::io::Error>; @@ -159,6 +161,8 @@ impl Read for ReadTrackingReader { } /// A trait that various rust-lightning types implement allowing them to be written out to a Writer +/// +/// (C-not exported) as we only export serialization to/from byte arrays instead pub trait Writeable { /// Writes self out to the given Writer fn write(&self, writer: &mut W) -> Result<(), ::std::io::Error>; @@ -186,6 +190,8 @@ impl<'a, T: Writeable> Writeable for &'a T { } /// A trait that various rust-lightning types implement allowing them to be read in from a Read +/// +/// (C-not exported) as we only export serialization to/from byte arrays instead pub trait Readable where Self: Sized { @@ -195,6 +201,8 @@ pub trait Readable /// A trait that various higher-level rust-lightning types implement allowing them to be read in /// from a Read given some additional set of arguments which is required to deserialize. +/// +/// (C-not exported) as we only export serialization to/from byte arrays instead pub trait ReadableArgs

where Self: Sized { @@ -203,6 +211,8 @@ pub trait ReadableArgs

} /// A trait that various rust-lightning types implement allowing them to (maybe) be read in from a Read +/// +/// (C-not exported) as we only export serialization to/from byte arrays instead pub trait MaybeReadable where Self: Sized {