Skip to main content

Held

Struct Held 

Source
pub struct Held { /* private fields */ }
Expand description

One target directory held open for a whole landing verb.

Opened once, right after the lock under an apply and before any evidence is gathered, and carried through every decision read and every write, so a target root exchanged under the pathname after validation receives nothing: the descriptor names the directory that was validated, whatever its path has since become.

Implementations§

Source§

impl Held

Source

pub fn open(target: &Utf8Path) -> Result<Self, RkError>

Hold target, following no link at its final component.

§Errors

The open failure, and a kernel link that is not UTF-8.

Source

pub fn open_locked( target: &Utf8Path, lock: &TargetLock, ) -> Result<Self, RkError>

Hold target under lock: the directory opened must be the one the lock key was derived from, or the target was exchanged between the two steps and the landing refuses before it reads anything.

§Errors

As Self::open, and a state-drift refusal naming the exchange.

Source

pub fn base(&self) -> &Utf8Path

The path every read of this target goes through: the kernel’s link to the held directory.

Source

pub fn display(&self) -> &Utf8Path

The path the operator named, for reports.

Trait Implementations§

Source§

impl Debug for Held

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Held

§

impl RefUnwindSafe for Held

§

impl Send for Held

§

impl Sync for Held

§

impl Unpin for Held

§

impl UnsafeUnpin for Held

§

impl UnwindSafe for Held

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.