fn encode_tagged<T: Encodable, V: Encodable>(&mut self,
                                                 tag: T,
                                                 value: &V)
                                                 -> Result<(), E::Error>
    {
        use ty::codec::TyEncoder;
        let start_pos = self.position();

        tag.encode(self)?;
        value.encode(self)?;

        let end_pos = self.position();
        ((end_pos - start_pos) as u64).encode(self)
    }
/// Encode something with additional information that allows to do some
/// sanity checks when decoding the data again. This method will first
/// encode the specified tag, then the given value, then the number of
/// bytes taken up by tag and value. On decoding, we can then verify that
/// we get the expected tag and read the expected number of bytes.
Encode something with additional information that allows to do some
sanity checks when decoding the data again. This method will first
encode the specified tag, then the given value, then the number of
bytes taken up by tag and value. On decoding, we can then verify that
we get the expected tag and read the expected number of bytes.
Encode something with additional information that allows to do some sanity checks when decoding the data again . This method will first encode the specified tag then the given value then the number of bytes taken up by tag and value . On decoding we can then verify that we get the expected tag and read the expected number of bytes .
fn encode_tagged<T: Encodable, V: Encodable>(&mut self,
                                                 tag: T,
                                                 value: &V)
                                                 -> Result<(), E::Error>
    {
        use ty::codec::TyEncoder;
        let start_pos = self.position();
        tag.encode(self)?;
        value.encode(self)?;
        let end_pos = self.position();
        ((end_pos - start_pos) as u64).encode(self)
    }
fn encode_tagged < T : Encodable , V : Encodable > ( & mut self , tag : T , value : & V ) -> Result < ( ) , E :: Error > { use ty :: codec :: TyEncoder ; let start_pos = self . position ( ) ; tag . encode ( self ) ? ; value . encode ( self ) ? ; let end_pos = self . position ( ) ; ( ( end_pos - start_pos ) as u64 ) . encode ( self ) }
Encode something with additional information that allows to do some
sanity checks when decoding the data again.
Encode something with additional information that allows to do some sanity checks when decoding the data again .
&mut self
tag
T
value
&V