pub fn new(bytes: Vec<u8>) -> GossipResult<Broadcast> {
        let mut reader = MemReader::new(bytes.clone());
        let version = try!(reader.read_byte().map_err(io_err));
        let tag = "foo".to_string();
        Ok(Broadcast {
            id: Uuid::new_v4(),
            version: Version(version),
            tag: tag,
            reader: reader,
            committed: HashSet::new()
        })
    }
/// Given a tag and message, create a new instance of Broadcast with
/// a brand-new unique ID so that we can uniquely identify it.
Given a tag and message, create a new instance of Broadcast with
a brand-new unique ID so that we can uniquely identify it.
Given a tag and message create a new instance of Broadcast with a brand - new unique ID so that we can uniquely identify it .
pub fn new(bytes: Vec<u8>) -> GossipResult<Broadcast> {
        let mut reader = MemReader::new(bytes.clone());
        let version = try!(reader.read_byte().map_err(io_err));
        let tag = "foo".to_string();
        Ok(Broadcast {
            id: Uuid::new_v4(),
            version: Version(version),
            tag: tag,
            reader: reader,
            committed: HashSet::new()
        })
    }
pub fn new ( bytes : Vec < u8 > ) -> GossipResult < Broadcast > { let mut reader = MemReader :: new ( bytes . clone ( ) ) ; let version = try ! ( reader read_byte ( ) map_err ( io_err ) ) ; let tag = " " . to_string ( ) ; Ok ( Broadcast { id : Uuid :: new_v4 ( ) , version : Version ( version ) , tag : tag , reader : reader , committed : HashSet :: new ( ) } ) }
Given a tag and message, create a new instance of Broadcast with
a brand-new unique ID so that we can uniquely identify it.
Given a tag and message create a new instance of Broadcast with a brand - new unique ID so that we can uniquely identify it .
bytes
Vec<u8>
bytes
Vec<u8>