pub fn prefix(mut self, prefix: &str) -> Result {
        if prefix.len() > PREFIX_LIM {
            Err(Error::InvalidPrefix(prefix.to_string()))
        } else {
            let n = prefix.len();
            self.strbuf[..n].copy_from_slice(prefix.as_bytes());
            self.start = n;
            Ok(self)
        }
    }
/// Sets the prefix.
///
/// If the prefix is longer than the supported length, an error is returned.
Sets the prefix.
If the prefix is longer than the supported length, an error is returned.
Sets the prefix . If the prefix is longer than the supported length an error is returned .
pub fn prefix(mut self, prefix: &str) -> Result {
        if prefix.len() > PREFIX_LIM {
            Err(Error::InvalidPrefix(prefix.to_string()))
        } else {
            let n = prefix.len();
            self.strbuf[..n].copy_from_slice(prefix.as_bytes());
            self.start = n;
            Ok(self)
        }
    }
pub fn prefix ( mut self , prefix : & str ) -> Result { if prefix . len ( ) > PREFIX_LIM { Err ( Error :: InvalidPrefix ( prefix . to_string ( ) ) ) } else { let n = prefix . len ( ) ; self . strbuf [ .. n ] . copy_from_slice ( prefix . as_bytes ( ) ) ; self . start = n ; Ok ( self ) } }
Sets the prefix.
Sets the prefix .
mut self
prefix
&str
mut self
prefix
&str