Skip to main content

value

Function value 

Source
pub fn value(raw: &[u8]) -> Result<Cow<'_, [u8]>>
Expand description

The logical value of a raw unit slice: for text, the inside with its escapes decoded (zero-copy when there are none); for a plain value, the slice with edge layout removed. A unit holding only a note or a dead level is the empty value. Fails on malformed input, on a level and on a reference (see Record::level and Record::reference).