pub struct DirEntry(/* private fields */);
Implementations§
source§impl DirEntry
impl DirEntry
sourcepub fn new(permission: Permission, filename_id: FilenameId) -> Option<DirEntry>
pub fn new(permission: Permission, filename_id: FilenameId) -> Option<DirEntry>
Returns a new DirEntry
or None
if filename_id
is 2^61 or greater
sourcepub fn filename_id(self) -> FilenameId
pub fn filename_id(self) -> FilenameId
Returns an id of the filename of the entry.
The id can be resolved to the filename through graph properties.
sourcepub fn permission(self) -> Option<Permission>
pub fn permission(self) -> Option<Permission>
Returns the file permission of the given directory entry
Panics
When the labelled graph is corrupt or generated by a newer swh-graph version
with more Permission
variants
sourcepub unsafe fn permission_unchecked(self) -> Permission
pub unsafe fn permission_unchecked(self) -> Permission
Returns the file permission of the given directory entry
Safety
May return an invalid Permission
variant if the labelled graph is corrupt
or generated by a newer swh-graph version with more variants
Trait Implementations§
source§impl From<UntypedEdgeLabel> for DirEntry
impl From<UntypedEdgeLabel> for DirEntry
source§fn from(label: UntypedEdgeLabel) -> DirEntry
fn from(label: UntypedEdgeLabel) -> DirEntry
Converts to this type from the input type.
source§impl PartialEq for DirEntry
impl PartialEq for DirEntry
impl Copy for DirEntry
impl Eq for DirEntry
impl StructuralEq for DirEntry
impl StructuralPartialEq for DirEntry
Auto Trait Implementations§
impl RefUnwindSafe for DirEntry
impl Send for DirEntry
impl Sync for DirEntry
impl Unpin for DirEntry
impl UnwindSafe for DirEntry
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
§impl<T, U> CastableInto<U> for Twhere
U: CastableFrom<T>,
impl<T, U> CastableInto<U> for Twhere U: CastableFrom<T>,
§impl<T> DowncastableFrom<T> for T
impl<T> DowncastableFrom<T> for T
§fn downcast_from(value: T) -> T
fn downcast_from(value: T) -> T
Truncate the current UnsignedInt to a possibly smaller size
§impl<T, U> DowncastableInto<U> for Twhere
U: DowncastableFrom<T>,
impl<T, U> DowncastableInto<U> for Twhere U: DowncastableFrom<T>,
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere T: ?Sized,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> UpcastableFrom<T> for T
impl<T> UpcastableFrom<T> for T
§fn upcast_from(value: T) -> T
fn upcast_from(value: T) -> T
Extend the current UnsignedInt to a possibly bigger size.