PathItemArgs

Struct PathItemArgs 

Source
pub struct PathItemArgs {
    pub key: FieldKey,
    pub path: PathBuf,
    pub parent: Option<FieldKey>,
    pub permission: Permission,
    pub owner: Owner,
    pub path_type: PathType,
    pub deferred: bool,
    pub metadata: HashMap<String, MetadataValue>,
}
Expand description

Input path item arguments

This struct is used in the ConfigBuilder::add_path_item as input arguments.

Fields§

§key: FieldKey

The name of the field.

§path: PathBuf

The path part that may or may not contain placeholders. For example, path/to/{item}. It is recommended that all path parts are always relative, and to have the root of the path defined as a placeholder.

§parent: Option<FieldKey>

The parent path item’s field key.

§permission: Permission

The permission of the path and all child paths unless explicitly set.

§owner: Owner

The owner of the path and all child paths unless explicitly set.

§path_type: PathType

The path of the path and all child paths unless explicitly set.

§deferred: bool

Whether the path is deferred or not. If a path is deferred, then the create_workspace will not resolve the path unless a subpath is resolvable. For example, if the path path/to/{thing} is marked as deferred, then even if the field thing is available when resolving the path, the path will not be resolved. However, if the path has a non-defferred subpath that expands the current path to path/to/{thing}/some/{subthing}, and both thing and subthing are valid, then the path will be resolved.

§metadata: HashMap<String, MetadataValue>

Extra metadata for the arguments that may be useful, such as marking a path as belonging to a specific user.

Trait Implementations§

Source§

impl Debug for PathItemArgs

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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> 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.