pub struct SourceTree {
pub files: BTreeMap<RelPath, Vec<u8>>,
}Expand description
Source files of one gateway directory, keyed by gateway-relative path
(resources/<module>/<type>/...).
Fields§
§files: BTreeMap<RelPath, Vec<u8>>Gateway-relative path to raw file bytes.
Implementations§
Source§impl SourceTree
impl SourceTree
Sourcepub fn from_files<I, P, B>(files: I) -> Result<SourceTree, String>
pub fn from_files<I, P, B>(files: I) -> Result<SourceTree, String>
Build a tree in memory (tests). Later entries replace earlier ones with the same path.
Sourcepub fn read_gateway(
gateway_dir: &Path,
env: &str,
) -> Result<SourceTree, CoreError>
pub fn read_gateway( gateway_dir: &Path, env: &str, ) -> Result<SourceTree, CoreError>
Read resources/, tags/ and modes/<env>/ of one gateway directory.
Every entry is inspected with symlink_metadata and never followed;
each directory’s entries are sorted by name bytes before recursing.
At the gateway root manifest.yaml (not collected, the action reads
it), resources/, tags/ (walked), modes/ and .gitkeep (skipped)
are accepted; any other root entry is a finding. Under modes/ only
the directory named exactly env is opened; other entries that are
directories belong to other environments and are skipped unopened, so
their content can never fail or change this render. Under
modes/<env>/ only resources/ and tags/ are accepted. Overlay
files are keyed by their full gateway-relative path
(modes/<env>/resources/...); render’s overlay stage resolves them.
Symlinks, non-regular files and unusable names are findings. All
findings are raised together as one deploy_tree_invalid.
Trait Implementations§
Source§impl Clone for SourceTree
impl Clone for SourceTree
Source§impl Debug for SourceTree
impl Debug for SourceTree
Source§impl Default for SourceTree
impl Default for SourceTree
impl Eq for SourceTree
Source§impl PartialEq for SourceTree
impl PartialEq for SourceTree
impl StructuralPartialEq for SourceTree
Auto Trait Implementations§
impl Freeze for SourceTree
impl RefUnwindSafe for SourceTree
impl Send for SourceTree
impl Sync for SourceTree
impl Unpin for SourceTree
impl UnsafeUnpin for SourceTree
impl UnwindSafe for SourceTree
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.