Skip to main content

Os

Enum Os 

Source
pub enum Os {
    MacOs,
    Linux,
    Windows,
}
Expand description

The operating systems Pitboard runs on. Windows only once it is released (crate::release): until then a Windows build of a release refuses everything, and its face, host/windows, refuses whatever is not built yet.

Variants§

§

MacOs

§

Linux

§

Windows

Implementations§

Source§

impl Os

Source

pub fn secrets_tool(self) -> Option<&'static str>

The program Pitboard reaches the system’s own store of secrets through, where it goes through one rather than calling the system directly.

Source

pub fn make_private_command(self, kind: Kind, paths: &[&str]) -> Option<String>

The command a person types on this system to make paths private to themselves. None where Pitboard cannot say one yet: on Windows, where a file is private through its access control list, W15 says the command along with who may read a file, and until then nothing asks, since the Windows face cannot tell who may.

Source

pub fn guarded_folders(self) -> &'static [&'static str]

The folders of a home, relative to it, that the system asks the person about before an app may look inside them. An app passes over a directory of PATH in one: looking would put that question to the person for something Pitboard never needed, and a program started from there would have it asked on its behalf.

macOS asks for the Desktop, Documents and Downloads folders, iCloud Drive and the folders of other cloud storage, under Privacy & Security’s Files & Folders. Linux asks nothing. Which folders Windows asks about, if any, is W17’s to say, with where an app finds a program there; until then none is passed over.

Source

pub fn package_bins(self) -> &'static [&'static str]

Where the system’s package managers put the programs they install, for an app that has no shell’s PATH to find one on, after each tool’s own installer’s place.

On a Mac, Homebrew’s bin on Apple silicon and on Intel. npm’s global bin is one of them where Homebrew installed Node, and /usr/local/bin where nodejs.org’s installer did, so a global npm install of a tool is found there too: Claude Code 2.1.289 lists both among npm’s places. Nothing on Linux looks, since no app runs there and the command line has a shell’s PATH, so none is said for it. Where winget, Scoop and npm put programs on Windows is W17’s to read; until then none is looked in.

Source

pub fn app_command_line(self, app: &Path) -> Option<PathBuf>

The command line an app at app comes with, which is what its renewal schedule runs: the app itself is not one. A Mac app carries it at Contents/Helpers/pitboard, where build-app.sh puts it, and anything that is not an app bundle, such as a test or a build directory, has none. No app runs on Linux. Where the Windows app carries its own is the app’s to say, which it does not yet.

Trait Implementations§

Source§

impl Clone for Os

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Os

Source§

impl Debug for Os

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Os

Source§

impl PartialEq for Os

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Os

Auto Trait Implementations§

§

impl Freeze for Os

§

impl RefUnwindSafe for Os

§

impl Send for Os

§

impl Sync for Os

§

impl Unpin for Os

§

impl UnsafeUnpin for Os

§

impl UnwindSafe for Os

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.