[][src]Trait sophia::serializer::Stringifier

pub trait Stringifier {
    fn as_utf8(&self) -> &[u8];

    fn as_str(&self) -> &str { ... }
fn to_string(&self) -> String { ... } }

A stringifier is special kind of TripleSerializer or QuadSerializer:

  • it uses a text-based format encoded in UTF8;
  • it stores the serialize data in memory;
  • it gives access to the serialized data as str or String.

Required methods

fn as_utf8(&self) -> &[u8]

Borrows the internal serialized data.

Safety

It is the responsibility of implementors to ensure that this data is valid UTF8. The methods as_str and to_string rely on this.

Loading content...

Provided methods

fn as_str(&self) -> &str

Borrows the internal serialized data as a str.

fn to_string(&self) -> String

Copy the internal serialized data to a String.

Loading content...

Implementors

impl Stringifier for sophia::serializer::nq::NtSerializer<Vec<u8>>[src]

impl Stringifier for sophia::serializer::nt::NtSerializer<Vec<u8>>[src]

Loading content...