Skip to main content

Layer

Struct Layer 

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

An active profile, read from its source at one revision, and rendered for the target.

Implementations§

Source§

impl Layer

Source

pub const fn source(&self) -> &Source

Where it came from.

Source

pub const fn source_name(&self) -> Option<&SourceName>

The name the target gives its source; None for a source a profile requires by git.

Source

pub const fn name(&self) -> &ProfileName

Its profile’s name, which names the layer.

Source

pub fn qualified(&self) -> String

source/profile, as the target names it; the profile’s name for a source a profile requires by git.

Source

pub const fn meta(&self) -> &Meta

Its [profile] table.

Source

pub const fn merge(&self) -> &MergeSpec

Its [merge] table.

Source

pub const fn rev(&self) -> Option<&Oid>

The commit, for a versioned source.

Source

pub const fn digest(&self) -> Digest

Digest of manifest, rendered payload and features together.

Source

pub fn declared(&self) -> &[FeatureName]

Every feature it declares, in order.

Source

pub const fn features(&self) -> &BTreeMap<FeatureName, BTreeSet<Enabler>>

Every feature that is on, with who turned it on.

Source

pub fn required_by(&self) -> &[ProfileName]

The profiles that require it.

Source

pub const fn configured(&self) -> bool

Whether the target configures it as a layer, rather than a profile requiring it.

Source

pub const fn files(&self) -> &BTreeMap<RelPath, LayerFile>

Its files, by rendered path: those that apply, and those whose gates say they do not.

Source

pub fn scaffolds( &self, ) -> impl Iterator<Item = (&ScaffoldName, impl Iterator<Item = &str>)>

Its scaffold groups, each with its sentinels.

Source

pub fn applied(&self) -> Applied

Whether this content is what the lock recorded.

Trait Implementations§

Source§

impl Debug for Layer

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Layer

§

impl RefUnwindSafe for Layer

§

impl Send for Layer

§

impl Sync for Layer

§

impl Unpin for Layer

§

impl UnsafeUnpin for Layer

§

impl UnwindSafe for Layer

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> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.