pub struct ContentEntry {
pub relative_path: String,
pub path: PathBuf,
pub exec_bits: Option<u32>,
pub modified_ms: Option<i64>,
}Expand description
One file in a skill’s canonical “content scope” — the set of files that
both hash_directory and the source-diff command operate on. Sharing
this enumeration keeps the update badge and the diff from ever
disagreeing about which files count.
Fields§
§relative_path: StringPath relative to the scanned directory, in the same lossy form the hash consumes (keeps the hashed byte stream stable).
path: PathBuf§exec_bits: Option<u32>mode & 0o111 on unix when metadata is readable, else None.
Always None on non-unix. None means “not folded into the hash”.
modified_ms: Option<i64>Modification time in ms since the Unix epoch, captured during the walk
so callers don’t need a second metadata() syscall (or a separate
recursive walk) just to learn when the content last changed.
Implementations§
Source§impl ContentEntry
impl ContentEntry
pub fn is_executable(&self) -> bool
Auto Trait Implementations§
impl Forget for ContentEntry
impl Freeze for ContentEntry
impl Move for ContentEntry
impl RefUnwindSafe for ContentEntry
impl Send for ContentEntrywhere
RawVecInner: Send,
impl Sync for ContentEntrywhere
RawVecInner: Sync,
impl Unpin for ContentEntry
impl UnsafeUnpin for ContentEntry
impl UnwindSafe for ContentEntrywhere
RawVecInner: UnwindSafe,
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.