Menu

Struct

FsAccess

kurogane::capability::FsAccessSource
pub struct FsAccess(/* private field */);

A set of operational filesystem capabilities.

The default is FsAccess::NONE. The bits limit what web content may do through fs.*; the application’s own Rust code is not restricted by them.

Associated constants

#const NONE: FsAccess = _

No native filesystem capability.

#const READ: FsAccess = _

Read a regular file’s contents.

#const METADATA: FsAccess = _

Read metadata (exists / size), never contents.

#const LIST: FsAccess = _

Enumerate a directory under the strict visibility policy.

#const WRITE: FsAccess = _

Replace the contents of an existing file.

#const CREATE: FsAccess = _

Create new files and directories.

#const DELETE: FsAccess = _

Remove files and empty directories.

#const RENAME: FsAccess = _

Rename or move entries.

#const ALL: FsAccess = _

Every capability.

Methods

#pub const fn contains(self, other: FsAccess) -> bool

Returns true when every bit of other is present.

#pub const fn union(self, other: FsAccess) -> FsAccess

Returns the union of both sets; the const form of |.

Trait implementations