pub(crate) struct ContentFacts {
pub initialized: bool,
pub cstr_trusted: bool,
pub utf8_trusted: bool,
}Expand description
Per-allocation content facts: whether the allocation’s contents are
readable, and whether they were asserted to be a valid C string / UTF-8.
These describe the stored bytes/values, so they live on MemoryContent
next to that data, rather than on AllocFacts (lifecycle).
Fields§
§initialized: boolWhether the allocation’s contents hold an initialized (readable) value:
a heap constructor (Box::new, Vec), a reference parameter’s referent,
a callee return, a write, ValidCStr, or const/static byte data.
Stays false for uninitialized memory (Box::new_uninit,
MaybeUninit::uninit).
cstr_trusted: boolWhether this allocation was asserted valid C string via a ValidCStr
contract fact / struct invariant (the “no interior NUL + terminal NUL”
trust marker).
utf8_trusted: boolWhether this allocation was asserted valid UTF-8 via a ValidString
contract fact (the “bytes form a valid UTF-8 sequence” trust marker).
Trait Implementations§
Source§impl Clone for ContentFacts
impl Clone for ContentFacts
Source§impl Debug for ContentFacts
impl Debug for ContentFacts
Auto Trait Implementations§
impl DynSend for ContentFacts
impl DynSync for ContentFacts
impl Freeze for ContentFacts
impl RefUnwindSafe for ContentFacts
impl Send for ContentFacts
impl Sync for ContentFacts
impl Unpin for ContentFacts
impl UnsafeUnpin for ContentFacts
impl UnwindSafe for ContentFacts
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more