Skip to main content

ResolvedPathItem

Struct ResolvedPathItem 

Source
pub struct ResolvedPathItem { /* private fields */ }
Expand description

The path item that has been validated and resolved in the config.

Implementations§

Source§

impl ResolvedPathItem

Source

pub fn key(&self) -> Option<&FieldKey>

The key for the path.

Source

pub fn value(&self) -> &Path

The fully resolved path.

This may not be a fully absolute path because the root can be defined as a variable.

Source

pub fn permission(&self) -> &Permission

The permission for the path.

There should be no inherited permissions at this point unless no permissions have been defined at all. Then it is recommended to have the workspace resolver decide what the “root” permission should be.

Source

pub fn owner(&self) -> &Owner

The owner of the path.

There should be no inherited owner at this point, unless no owner has been defined at all. Then it is recommended to have the workspace resolver decide what the “root” owner should be.

Source

pub fn path_type(&self) -> &PathType

The type of the path.

It is assumed that all of the elements except the last will be directories. If the path is a file, then the workspace resolver should use simple logic to create a file (such as copying and pasting from another location). The file template can use a template engine defined in the create workspace’s IO function.

Source

pub fn deferred(&self) -> bool

Whether the path is deferred or not.

Source

pub fn metadata(&self) -> &HashMap<String, MetadataValue>

Metadata for the workspace resolver.

This could contain anything such as the specific user that owns the path, or the source path to copy and paste the file from.

Trait Implementations§

Source§

impl Clone for ResolvedPathItem

Source§

fn clone(&self) -> ResolvedPathItem

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ResolvedPathItem

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.