pub struct ProtectedContext { /* private fields */ }Implementations§
Source§impl ProtectedContext
impl ProtectedContext
Sourcepub fn load(path: &Path) -> Result<Self, &'static str>
pub fn load(path: &Path) -> Result<Self, &'static str>
Legacy development raw context only; never inferred as versioned.
Sourcepub fn load_versioned(path: &Path) -> Result<Self, &'static str>
pub fn load_versioned(path: &Path) -> Result<Self, &'static str>
Canonical versioned context, held from the original open. Exact wrapper bytes are the snapshot and config digest, not reserialized inner bytes.
Sourcepub fn from_held_versioned(
path: &Path,
file: File,
) -> Result<Self, &'static str>
pub fn from_held_versioned( path: &Path, file: File, ) -> Result<Self, &'static str>
Takes ownership of the original read-only CLOEXEC config descriptor. Path is checked for identity only, never reopened for config bytes. Reads at explicit offsets, independent of the caller’s shared cursor.
pub fn is_versioned(&self) -> bool
pub fn revalidate(&self) -> Result<(), &'static str>
Sourcepub fn socket_file(&self) -> Result<&File, &'static str>
pub fn socket_file(&self) -> Result<&File, &'static str>
Borrow the held Linux O_PATH socket handle after revalidation. A transport may connect through /proc/self/fd/N to avoid reopening the ambient path. This alone is not peer authentication or a mutation capability.
pub fn snapshot(&self) -> Result<(&ExpectedContext, &[u8]), &'static str>
pub fn config_sha256(&self) -> Result<String, &'static str>
Source§impl ProtectedContext
impl ProtectedContext
Sourcepub fn capture_image_for_plan<F>(
&self,
id: &str,
get: F,
) -> Result<CapturedImage, &'static str>
pub fn capture_image_for_plan<F>( &self, id: &str, get: F, ) -> Result<CapturedImage, &'static str>
Capture exact bounded evidence only after protected info/image/info. An eventual record constructor must accept this type, never ImageFacts.
Sourcepub fn inspect_with<F>(
&self,
id: &str,
get: F,
) -> Result<InspectOutcome, &'static str>
pub fn inspect_with<F>( &self, id: &str, get: F, ) -> Result<InspectOutcome, &'static str>
No retry, mutation or lease authority. Even an exact Missing result is withheld until the final info observation and filesystem check succeed.
Sourcepub fn inspect_owned_with<F>(
&self,
owner: &ExpectedContainer,
get: F,
) -> Result<State, &'static str>
pub fn inspect_owned_with<F>( &self, owner: &ExpectedContainer, get: F, ) -> Result<State, &'static str>
Selected ownership facts under the same protected observation sequence. The expected plan still requires durable installation/slot binding.