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

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

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

Builds a new Mistrust.

Errors

If a required field has not been initialized.

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.

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.

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

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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.