pub struct MistrustBuilder { /* private fields */ }
Expand description

Builder for Mistrust.

Implementations§

If the user called MistrustBuilder::ignore_prefix, what did they give us?

(This is stored in canonical form.)

Available on target_family="unix" and non-iOS and non-Android only.

What user ID do we trust by default (if any?)

Available on target_family="unix" and non-iOS and non-Android only.

What group ID do we trust by default (if any?)

Builds a new Mistrust.

Errors

If a required field has not been initialized.

Available on target_family="unix" and non-iOS and non-Android only.

Configure this Mistrust to trust only the admin (root) user.

By default, both the currently running user and the root user will be trusted.

This option disables the default group-trust behavior as well.

Available on target_family="unix" and non-iOS and non-Android only.

Configure this Mistrust to trust no groups at all.

By default, we trust the group (if any) with the same name as the current user if we are currently running as a member of that group.

With this option set, no group is trusted, and and any group-readable or group-writable objects are treated the same as world-readable and world-writable objects respectively.

Configure this Mistrust to trust every user and every group.

With this option set, every file and directory is treated as having valid permissions: even world-writeable files are allowed. File-type checks are still performed.

This option is mainly useful to handle cases where you want to make these checks optional, and still use CheckedDir without having to implement separate code paths for the “checking on” and “checking off” cases.

Setting this flag will supersede any value set in the environment.

Remove any ignored prefix, restoring this MistrustBuilder to a state as if MistrustBuilder::ignore_prefix had not been called.

Configure this MistrustBuilder to become disabled based on the environment variable var.

(If the variable is “false”, “no”, or “0”, it will be treated as false; other values are treated as true.)

If var is not set, then we’ll look at $FS_MISTRUST_DISABLE_PERMISSIONS_CHECKS.

Like controlled_by_env_var, but do not override any previously set environment settings.

(The arti-client wants this, so that it can inform a caller-supplied MistrustBuilder about its Arti-specific env var, but only if the caller has not already provided a variable of its own. Other code embedding fs-mistrust may want it too.)

Configure this MistrustBuilder to become disabled based on the environment variable $FS_MISTRUST_DISABLE_PERMISSIONS_CHECKS only,

(If the variable is “false”, “no”, “0”, or “”, it will be treated as false; other values are treated as true.)

This is the default.

Configure this MistrustBuilder to never consult the environment to see whether it should be disabled.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Deserialize this value from the given Serde deserializer. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.