Skip to main content

Act

Enum Act 

Source
pub enum Act {
Show 19 variants Remove(Arg), Write(Arg), Read(Arg), ReadTree(Arg), Opaque(Arg), Move { from: Arg, to: Arg, }, Link { target: Arg, link: Arg, }, Chmod { path: Arg, mode: Arg, }, Chown(Arg), Chdir(Arg), In(Arg, Vec<Act>), Script(Arg), Program(Vec<Arg>), Code(Language, String), Unread(String), Downloaded(String), Loads(String), Environment, Started(Vec<Act>),
}
Expand description

What reading code found, in the order the code gives it.

Variants§

§

Remove(Arg)

rm -rf PATH: a file or a whole tree goes.

§

Write(Arg)

Writes into a file, makes one, or truncates it.

§

Read(Arg)

Reads a file (open(path), readFileSync(path), the source of a copy): judged as cat PATH is, so a key it names is a read of one.

§

ReadTree(Arg)

Reads a folder and everything under it (TarFile.add, the folder shutil.make_archive packs): judged as grep -r is, so a folder that holds a key, or the home directory, is a read of one.

§

Opaque(Arg)

A path handed to a call the reader does not know: it may read it, write it or delete it, so the caller cannot take the code for understood, unless the path is a key, which is judged as cat PATH is.

§

Move

mv FROM TO.

Fields

§from: Arg

What moves.

§to: Arg

Where it goes.

ln TARGET LINK.

Fields

§target: Arg

What the link points to.

§link: Arg

The link itself.

§

Chmod

chmod MODE PATH; mode is in octal where the code gives a number.

Fields

§path: Arg

The path whose permissions change.

§mode: Arg

The mode it is given.

§

Chown(Arg)

chown OWNER PATH.

§

Chdir(Arg)

The process moves to another directory: the paths after it are read from there.

§

In(Arg, Vec<Act>)

What a call that starts a program does, run from the directory its cwd option names: judged as if the code had moved there first, and back where it was after.

§

Script(Arg)

A command line a shell runs: os.system, child_process.exec.

§

Program(Vec<Arg>)

A program and its arguments, run without a shell: the program first.

§

Code(Language, String)

Code the code runs from a literal (exec("…")), to be read in its own language.

§

Unread(String)

Something the reader cannot follow, as a short piece of the code.

§

Downloaded(String)

Code loaded from the network (import … from 'https://…'): it is downloaded and run, and not read.

§

Loads(String)

Code loaded from a file outside the workspace (require('/tmp/x.js'), fork('../x.js')), which is not the workspace’s own and is not read.

§

Environment

A write to the environment of the process itself (os.environ[...] =, os.putenv, process.env.X =): a program the code starts after it is given the variable.

§

Started(Vec<Act>)

What a call that starts a program does, given an environment the code sets: it may hold a variable that loads code (PYTHONPATH, NODE_OPTIONS), so the caller cannot take the program for the one it reads.

Trait Implementations§

Source§

impl Clone for Act

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 Debug for Act

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Forget for Act

§

impl Freeze for Act

§

impl Move for Act

§

impl RefUnwindSafe for Act

§

impl Send for Act

§

impl Sync for Act

§

impl Unpin for Act

§

impl UnsafeUnpin for Act

§

impl UnwindSafe for Act

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<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> 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.