AtomString

Type Alias AtomString 

Source
pub type AtomString = ArrayAtomBody<(), i8>;
Expand description

ASCII String.

See the module documentation for more information.

Aliased Type§

#[repr(C)]
pub struct AtomString { pub header: (), pub data: [i8], }

Fields§

§header: ()§data: [i8]

Implementations§

Source§

impl AtomString

Source

pub fn as_cstr(&self) -> Result<&CStr, FromBytesWithNulError>

Try to wrap the string into a CStr reference.

This function returns an error if the internal conversion fails.

Trait Implementations§

Source§

impl AtomBody for AtomString

Source§

type InitializationParameter = CStr

The type of the parameter for initialize_body Read more
Source§

fn get_uri() -> &'static CStr

Return the URI of the atom type.
Source§

unsafe fn initialize_body<'a, W>( writer: &mut W, string: &CStr, urids: &mut CachedMap, ) -> Result<(), ()>
where W: WritingFrame<'a> + WritingFrameExt<'a, Self>,

Write out a basic but valid atom body. Read more
Source§

fn create_ref<'a>(raw_data: &'a [u8]) -> Result<&'a Self, ()>

Try to create a Self reference from a slice of raw data. Read more