pub trait StringT {
// Required methods
fn encode_to_buf(self, string: &mut Vec<u8>);
fn encode_to_buf_with_separator(self, string: &mut Vec<u8>, separator: &str);
fn encode_to_bytes_buf(self, string: &mut BytesMut);
fn encode_to_bytes_buf_with_separator(
self,
string: &mut BytesMut,
separator: &str,
);
}
Expand description
Trait for string-like types.
Required Methods§
Sourcefn encode_to_buf(self, string: &mut Vec<u8>)
fn encode_to_buf(self, string: &mut Vec<u8>)
Push the value to the string (the underlying Vec<u8>
).
Sourcefn encode_to_buf_with_separator(self, string: &mut Vec<u8>, separator: &str)
fn encode_to_buf_with_separator(self, string: &mut Vec<u8>, separator: &str)
Push the value to the string (the underlying Vec<u8>
) with a
separator.
Only affects the array-or-slice-like types.
Sourcefn encode_to_bytes_buf(self, string: &mut BytesMut)
fn encode_to_bytes_buf(self, string: &mut BytesMut)
Push the value to the string (the underlying bytes::BytesMut
).
Sourcefn encode_to_bytes_buf_with_separator(
self,
string: &mut BytesMut,
separator: &str,
)
fn encode_to_bytes_buf_with_separator( self, string: &mut BytesMut, separator: &str, )
Push the value to the string (the underlying bytes::BytesMut
) with a
separator.
Only affects the array-or-slice-like types.