/// Append a value
///
/// Returns the index of the appended data
Append a value
Returns the index of the appended data
Append a value Returns the index of the appended data
pub fn append(&mut self, data: &str) -> usize {
        let id = self.offsets.len() - 1;
        let offset = self.storage.len() + data.len();
        let offset = K::from_usize(offset).expect("failed to fit into offset type");
        self.offsets.push(offset);
        self.storage.push_str(data);
        id
    }
pub fn append ( & mut self , data : & str ) -> usize { let id = self . offsets . len ( ) - 1 ; let offset = self . storage . len ( ) + data . len ( ) ; let offset = K :: from_usize ( offset ) . expect ( " " ) ; self . offsets . push ( offset ) ; self . storage . push_str ( data ) ; id }
Append a value
Returns the index of the appended data
Append a value Returns the index of the appended data
&mut self
data
&str