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

A “builder” that allows customizing options to realpath_raw().

realpath(path, flags) is equivalent to RealpathBuilder::new().flags(flags).realpath(path).

Implementations

Create a new “builder”.

The returned builder has its flags empty. max_size will be set to 32768 on WASI, and PATH_MAX on other OSes.

Set the maximum path length allowed before failing with ENAMETOOLONG.

Generally speaking, this is only useful if the OS supports paths longer than PATH_MAX (for example, this is the case on WASI).

Note: In some cases, Self::realpath() may allocate a smaller buffer than this length, then expand it and retry if resolution fails with ENAMETOOLONG.

Set the flags used to modify path resolution.

See RealpathFlags for more information.

Canonicalize the given path.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Returns the “default value” for a type. 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

Performs the conversion.

Performs the conversion.

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.