Enum nix_compat::nar::listing::ListingEntry
source · pub enum ListingEntry {
Regular {
size: u64,
executable: bool,
nar_offset: u64,
},
Directory {
entries: HashMap<String, ListingEntry>,
},
Symlink {
target: String,
},
}
Variants§
Implementations§
source§impl ListingEntry
impl ListingEntry
sourcepub fn locate<P: AsRef<Path>>(
&self,
path: P,
) -> Result<Option<&ListingEntry>, ListingError>
pub fn locate<P: AsRef<Path>>( &self, path: P, ) -> Result<Option<&ListingEntry>, ListingError>
Given a relative path without ..
component, this will locate, relative to this entry, a
deeper entry.
If the path is invalid, a listing error ListingError
will be returned.
If the entry cannot be found, None
will be returned.
Trait Implementations§
source§impl Debug for ListingEntry
impl Debug for ListingEntry
source§impl<'de> Deserialize<'de> for ListingEntry
impl<'de> Deserialize<'de> for ListingEntry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ListingEntry
impl RefUnwindSafe for ListingEntry
impl Send for ListingEntry
impl Sync for ListingEntry
impl Unpin for ListingEntry
impl UnwindSafe for ListingEntry
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