pub struct ExtensionSources {
pub user: Option<PathBuf>,
pub repo: Option<PathBuf>,
pub trust_repo: bool,
}Expand description
Where extensions are loaded from, and whether they may run.
The two directories are split deliberately. The user’s own directory is always loaded because the user put it there. A repository’s directory is not, and checking out a repository must never run code.
Fields§
§user: Option<PathBuf>~/.config/yk/lua, always loaded.
repo: Option<PathBuf><repo>/.yk/lua, loaded only when trust_repo is set.
trust_repo: boolWhether the repository’s scripts may run this session.
Implementations§
Trait Implementations§
Source§impl Clone for ExtensionSources
impl Clone for ExtensionSources
Source§impl Debug for ExtensionSources
impl Debug for ExtensionSources
Auto Trait Implementations§
impl Forget for ExtensionSources
impl Freeze for ExtensionSources
impl Move for ExtensionSources
impl RefUnwindSafe for ExtensionSources
impl Send for ExtensionSourceswhere
RawVecInner: Send,
impl Sync for ExtensionSourceswhere
RawVecInner: Sync,
impl Unpin for ExtensionSources
impl UnsafeUnpin for ExtensionSources
impl UnwindSafe for ExtensionSourceswhere
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more