Struct rkyv::ffi::ArchivedCString [−][src]
#[repr(transparent)]pub struct ArchivedCString(_);
Implementations
Returns the contents of this CString as a slice of bytes.
The returned slice does not contain the trailing nul terminator, and it is guaranteed to
not have any interior nul bytes. If you need the nul terminator, use
as_bytes_with_nul
instead.
Equivalent to as_bytes
except that the returned slice
includes the trailing nul terminator.
Extracts a pinned mutable CStr
slice containing the entire string.
pub unsafe fn resolve_from_c_str(
c_str: &CStr,
pos: usize,
resolver: CStringResolver,
out: *mut Self
)
pub unsafe fn resolve_from_c_str(
c_str: &CStr,
pos: usize,
resolver: CStringResolver,
out: *mut Self
)
Resolves an archived C string from the given C string and parameters.
Safety
pos
must be the position ofout
within the archiveresolver
must be the result of serializing a C string
pub fn serialize_from_c_str<S: Serializer + ?Sized>(
c_str: &CStr,
serializer: &mut S
) -> Result<CStringResolver, S::Error>
pub fn serialize_from_c_str<S: Serializer + ?Sized>(
c_str: &CStr,
serializer: &mut S
) -> Result<CStringResolver, S::Error>
Serializes a C string.
Trait Implementations
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for ArchivedCString
impl Send for ArchivedCString
impl Sync for ArchivedCString
impl !Unpin for ArchivedCString
impl UnwindSafe for ArchivedCString
Blanket Implementations
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Converts some archived metadata to the pointer metadata for itself.
Mutably borrows from an owned value. Read more
impl<F, W, T, D> Deserialize<With<T, W>, D> for F where
D: Fallible + ?Sized,
F: ?Sized,
W: DeserializeWith<F, T, D>,
impl<F, W, T, D> Deserialize<With<T, W>, D> for F where
D: Fallible + ?Sized,
F: ?Sized,
W: DeserializeWith<F, T, D>,