pub struct OneEntry { /* private fields */ }
Implementations§
Source§impl OneEntry
impl OneEntry
pub fn new( entry_named: Box<dyn OneEntryNamed>, directory: impl Into<PathBuf>, ) -> Self
pub fn entry(&self) -> &dyn OneEntryNamed
pub fn entry_type(&self) -> &EntryType
pub fn entry_name(&self) -> &EntryName
pub fn directory(&self) -> &Path
Sourcepub fn exists(&self) -> Result<bool>
pub fn exists(&self) -> Result<bool>
Return true if there exists exactly one entry of the specified type and name, false otherwise
Sourcepub fn find(&self) -> Result<PathBuf>
pub fn find(&self) -> Result<PathBuf>
Try to find an exactly one entry of the specified type and name
pub fn as_path_buf(&self) -> Result<PathBuf>
pub fn as_os_string(&self) -> Result<OsString>
pub fn as_string(&self) -> Result<String>
pub fn as_bytes(&self) -> Result<Vec<u8>>
Trait Implementations§
Source§impl OneEntryCopier for OneEntry
impl OneEntryCopier for OneEntry
Auto Trait Implementations§
impl Freeze for OneEntry
impl !RefUnwindSafe for OneEntry
impl !Send for OneEntry
impl !Sync for OneEntry
impl Unpin for OneEntry
impl !UnwindSafe for OneEntry
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