pub struct SocketDir { /* private fields */ }Expand description
A directory checked once against every socket it will hold.
Implementations§
Source§impl SocketDir
impl SocketDir
Sourcepub fn new(dir: impl Into<PathBuf>, names: &[SocketName]) -> Result<Self>
pub fn new(dir: impl Into<PathBuf>, names: &[SocketName]) -> Result<Self>
Fails when dir joined with the longest of names would not fit.
Declare every socket the directory will hold, including names derived at runtime (declare the longest a derivation can produce, e.g. with its widest generation suffix). The error says how long the directory may be.
Sourcepub fn path(&self, name: SocketName) -> Result<PathBuf>
pub fn path(&self, name: SocketName) -> Result<PathBuf>
The socket name in this directory. Checked again, so a name that was
not declared to SocketDir::new cannot slip through.
Trait Implementations§
impl Eq for SocketDir
impl StructuralPartialEq for SocketDir
Auto Trait Implementations§
impl Freeze for SocketDir
impl RefUnwindSafe for SocketDir
impl Send for SocketDir
impl Sync for SocketDir
impl Unpin for SocketDir
impl UnsafeUnpin for SocketDir
impl UnwindSafe for SocketDir
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