fn add_str<S>(&mut self, tag: u16, value: S)
    where
        S: AsRef<str>,
    {
        self.add_data(tag, value.as_ref().as_bytes())
    }
/// Add a str field to the frame.
///
/// ```
/// use yatlv::{FrameBuilder, FrameBuilderLike};
/// let mut data = Vec::with_capacity(100);
/// {
///     let mut bld = FrameBuilder::new(&mut data);
///     let tag = 45;
///     let data = "hello";
///     bld.add_str(tag, data);
/// }
/// assert_eq!(&[
///     1,                      // frame-format
///     0, 0, 0, 1,             // field count
///     0, 45,                  // field-tag
///     0, 0, 0, 5,             // field-length
///     104, 101, 108, 108, 111 // field-value
/// ], &data[..]);
/// ```
Add a str field to the frame.
Add a str field to the frame .
fn add_str<S>(&mut self, tag: u16, value: S)
    where
        S: AsRef<str>,
    {
        self.add_data(tag, value.as_ref().as_bytes())
    }
fn add_str < S > ( & mut self , tag : u16 , value : S ) where S : AsRef < str > , { self . add_data ( tag , value . as_ref ( ) . as_bytes ( ) ) }
Add a str field to the frame.
Add a str field to the frame .
&mut self
tag
u16
value
S
&mut self
tag
u16
value
S