pub struct SkillAsset {
pub relative_path: PathBuf,
pub bytes: Vec<u8>,
pub executable: bool,
}Expand description
One supporting file inside a skill directory.
Fields§
§relative_path: PathBufPath relative to the skill directory, e.g.
PathBuf::from("scripts/run.sh"). Must be a relative path; absolute
paths or .. segments are rejected at install time.
bytes: Vec<u8>Raw bytes of the file. Lets callers ship binary references (e.g.
images under assets/) as well as text scripts.
executable: boolOn Unix, set the file mode to 0o755 after writing. No-op on
Windows. Use for shell/python scripts under scripts/.
Trait Implementations§
Source§impl Clone for SkillAsset
impl Clone for SkillAsset
Source§fn clone(&self) -> SkillAsset
fn clone(&self) -> SkillAsset
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SkillAsset
impl RefUnwindSafe for SkillAsset
impl Send for SkillAsset
impl Sync for SkillAsset
impl Unpin for SkillAsset
impl UnsafeUnpin for SkillAsset
impl UnwindSafe for SkillAsset
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