pub fn lightning_serialize<T>(data: &T) -> Result<Vec<u8>, Error>
where
    T: LightningEncode,
{
    data.lightning_serialize()
}
/// Convenience method for strict encoding of data structures implementing
/// [`LightningEncode`] into a byte vector.
Convenience method for strict encoding of data structures implementing
[`LightningEncode`] into a byte vector.
Convenience method for strict encoding of data structures implementing [ ` LightningEncode ` ] into a byte vector .
pub fn lightning_serialize<T>(data: &T) -> Result<Vec<u8>, Error>
where
    T: LightningEncode,
{
    data.lightning_serialize()
}
pub fn lightning_serialize < T > ( data : & T ) -> Result < Vec < u8 > , Error > where T : LightningEncode , { data . lightning_serialize ( ) }
Convenience method for strict encoding of data structures implementing
[`LightningEncode`] into a byte vector.
Convenience method for strict encoding of data structures implementing [ ` LightningEncode ` ] into a byte vector .
data
&T
data
&T