pub enum DirFd<'fd> {
Cwd,
Fd(BorrowedFd<'fd>),
}Expand description
Base d’un appel *at (cf. ADR-021 convention 1).
Remplace la sentinelle kernel AT_FDCWD (-100) par une variante
Cwd typée. Air exige une base explicite sur toutes les opérations
filesystem — pas de dépendance implicite au cwd global du processus.
§Examples
use air_sys_types::fs::DirFd;
// Ouvrir un fichier par rapport au répertoire courant
let _dirfd = DirFd::Cwd;Variants§
Cwd
Répertoire courant du processus (équivalent à AT_FDCWD).
Fd(BorrowedFd<'fd>)
FD d’un répertoire ouvert (accès relatif à ce répertoire).
Trait Implementations§
Auto Trait Implementations§
impl<'fd> Freeze for DirFd<'fd>
impl<'fd> RefUnwindSafe for DirFd<'fd>
impl<'fd> Send for DirFd<'fd>
impl<'fd> Sync for DirFd<'fd>
impl<'fd> Unpin for DirFd<'fd>
impl<'fd> UnsafeUnpin for DirFd<'fd>
impl<'fd> UnwindSafe for DirFd<'fd>
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