pub fn serializer<'a>(
        &'a self,
        font: Option<&'a crate::Font<'a>>,
        format: SerializeFormat,
        flags: SerializeFlags,
    ) -> BufferSerializer<'a> {
        BufferSerializer {
            font,
            buffer: &self.0,
            start: 0,
            end: self.len(),
            format,
            flags,
            bytes: io::Cursor::new(Vec::with_capacity(128)),
        }
    }
/// Returns a serializer that allows the contents of the buffer to be
/// converted into a human or machine readable representation.
///
/// # Arguments
/// - `font`: Optionally a font can be provided for access to glyph names
///   and glyph extents. If `None` is passed an empty font is assumed.
/// - `format`: The serialization format to use.
/// - `flags`: Allows you to control which information will be contained in
///   the serialized output.
///
/// # Examples
///
/// Serialize the glyph buffer contents to a string using the textual format
/// without any special flags.
/// ```
/// use harfbuzz_rs::*;
/// use std::io::Read;
/// # use std::path::PathBuf;
/// # let mut path = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
/// # path.push("testfiles/SourceSansVariable-Roman.ttf");
/// let face = Face::from_file(path, 0).expect("Error reading font file.");
/// let font = Font::new(face);
///
/// let buffer = UnicodeBuffer::new().add_str("ABC");
///
/// let buffer = shape(&font, buffer, &[]);
///
/// let mut string = String::new();
/// buffer
///     .serializer(
///         Some(&font),
///         SerializeFormat::Text,
///         SerializeFlags::default(),
///     ).read_to_string(&mut string)
///     .unwrap();
///
/// assert_eq!(string, "gid2=0+520|gid3=1+574|gid4=2+562")
/// ```
Returns a serializer that allows the contents of the buffer to be
converted into a human or machine readable representation.
Returns a serializer that allows the contents of the buffer to be converted into a human or machine readable representation .
pub fn serializer<'a>(
        &'a self,
        font: Option<&'a crate::Font<'a>>,
        format: SerializeFormat,
        flags: SerializeFlags,
    ) -> BufferSerializer<'a> {
        BufferSerializer {
            font,
            buffer: &self.0,
            start: 0,
            end: self.len(),
            format,
            flags,
            bytes: io::Cursor::new(Vec::with_capacity(128)),
        }
    }
pub fn serializer < ' a > ( & ' a self , font : Option < & ' a crate :: Font < ' a > > , format : SerializeFormat , flags : SerializeFlags , ) -> BufferSerializer < ' a > { BufferSerializer { font , buffer : & self . 0 , start : 0 , end : self . len ( ) , format , flags , bytes : io :: Cursor :: new ( Vec :: with_capacity ( 128 ) ) , } }
Returns a serializer that allows the contents of the buffer to be
converted into a human or machine readable representation.
Returns a serializer that allows the contents of the buffer to be converted into a human or machine readable representation .
&'a self
font
Option<&'a crate::Font<'a>>
format
SerializeFormat
flags
SerializeFlags
&'a self
font
Option<&'a crate::Font<'a>>
Optionally a font can be provided for access to glyph names
and glyph extents. If `None` is passed an empty font is assumed.
Optionally a font can be provided for access to glyph names and glyph extents . If ` None ` is passed an empty font is assumed .
format
SerializeFormat
The serialization format to use.
The serialization format to use .
flags
SerializeFlags
Allows you to control which information will be contained in
the serialized output.
Allows you to control which information will be contained in the serialized output .
examples
Serialize the glyph buffer contents to a string using the textual format
without any special flags.
```
use harfbuzz_rs::*;
use std::io::Read.
Serialize the glyph buffer contents to a string using the textual format without any special flags . ` ` ` use harfbuzz_rs :: * ; use std :: io :: Read .
use std::path::pathbuf;
None
let mut path = pathbuf::from(env!("cargo_manifest_dir"));
None
path.push("testfiles/sourcesansvariable-roman.ttf");
let face = Face::from_file(path, 0).expect("Error reading font file.");
let font = Font::new(face).

let buffer = UnicodeBuffer::new().add_str("ABC").

let buffer = shape(&font, buffer, &[]).

let mut string = String::new();
buffer
.serializer(
Some(&font),
SerializeFormat::Text,
SerializeFlags::default(),
).read_to_string(&mut string)
.unwrap().


let face = Face :: from_file ( path 0 ) . expect ( " Error reading font file . " ) ; let font = Font :: new ( face ) . let buffer = UnicodeBuffer :: new () . add_str ( " ABC " ) . let buffer = shape ( &font buffer & [] ) . let mut string = String :: new () ; buffer . serializer ( Some ( &font ) SerializeFormat :: Text SerializeFlags :: default () ) . read_to_string ( &mut string ) . unwrap () .