pub fn decode_transaction_header(bytes: &[u8]) -> Result<(TransactionHeader, &[u8])> {
    let mut header = TransactionHeader::new_empty();
    // The header doesn't contain unions, so the context flag doesn't matter.
    let context = Context {};
    let header_len = <TransactionHeader as Layout>::inline_size(&context);
    if bytes.len() < header_len {
        return Err(Error::OutOfRange);
    }
    let (header_bytes, body_bytes) = bytes.split_at(header_len);
    let handles = &mut [];
    Decoder::decode_with_context(&context, header_bytes, handles, &mut header)?;
    Ok((header, body_bytes))
}
/// Decodes the transaction header from a message.
/// Returns the header and a reference to the tail of the message.
Decodes the transaction header from a message.
Returns the header and a reference to the tail of the message.
Decodes the transaction header from a message . Returns the header and a reference to the tail of the message .
pub fn decode_transaction_header(bytes: &[u8]) -> Result<(TransactionHeader, &[u8])> {
    let mut header = TransactionHeader::new_empty();
    // The header doesn't contain unions, so the context flag doesn't matter.
    let context = Context {};
    let header_len = <TransactionHeader as Layout>::inline_size(&context);
    if bytes.len() < header_len {
        return Err(Error::OutOfRange);
    }
    let (header_bytes, body_bytes) = bytes.split_at(header_len);
    let handles = &mut [];
    Decoder::decode_with_context(&context, header_bytes, handles, &mut header)?;
    Ok((header, body_bytes))
}
pub fn decode_transaction_header ( bytes : & [ u8 ] ) -> Result < ( TransactionHeader , & [ u8 ] ) > { let mut header = TransactionHeader :: new_empty ( ) ; // The header doesn't contain unions, so the context flag doesn't matter. let context = Context { } ; let header_len = < TransactionHeader as Layout > :: inline_size ( & context ) ; if bytes . len ( ) < header_len { return Err ( Error :: OutOfRange ) ; } let ( header_bytes , body_bytes ) = bytes . split_at ( header_len ) ; let handles = & mut [ ] ; Decoder :: decode_with_context ( & context , header_bytes , handles , & mut header ) ? ; Ok ( ( header , body_bytes ) ) }
Decodes the transaction header from a message.
Decodes the transaction header from a message .
bytes
&[u8]