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
impl Held
Sourcepub fn open(target: &Utf8Path) -> Result<Self, RkError>
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.
Sourcepub fn open_locked(
target: &Utf8Path,
lock: &TargetLock,
) -> Result<Self, RkError>
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.
Trait Implementations§
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> 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
Mutably borrows from an owned value. Read more