Skip to main content

EddaPaths

Struct EddaPaths 

Source
pub struct EddaPaths {
Show 14 fields pub root: PathBuf, pub edda_dir: PathBuf, pub ledger_dir: PathBuf, pub ledger_db: PathBuf, pub blobs_dir: PathBuf, pub branches_dir: PathBuf, pub drafts_dir: PathBuf, pub lock_file: PathBuf, pub config_json: PathBuf, pub patterns_dir: PathBuf, pub blob_meta_json: PathBuf, pub tombstones_jsonl: PathBuf, pub archive_dir: PathBuf, pub archive_blobs_dir: PathBuf,
}
Expand description

All well-known paths under .edda/.

Fields§

§root: PathBuf§edda_dir: PathBuf§ledger_dir: PathBuf§ledger_db: PathBuf§blobs_dir: PathBuf§branches_dir: PathBuf§drafts_dir: PathBuf§lock_file: PathBuf§config_json: PathBuf§patterns_dir: PathBuf§blob_meta_json: PathBuf§tombstones_jsonl: PathBuf§archive_dir: PathBuf§archive_blobs_dir: PathBuf

Implementations§

Source§

impl EddaPaths

Source

pub fn discover(repo_root: impl Into<PathBuf>) -> Self

Derive all paths from a repo root. Pure computation, no I/O.

Source

pub fn ensure_layout(&self) -> Result<()>

Create all required directories. Idempotent.

Source

pub fn is_initialized(&self) -> bool

Check whether .edda/ exists.

Source

pub fn branch_dir(&self, name: &str) -> PathBuf

Resolve a branch directory under .edda/branches/<name>/.

Source§

impl EddaPaths

Source

pub fn find_root(start: &Path) -> Option<PathBuf>

Walk up from start looking for a directory containing .edda/. Returns None if not found.

Trait Implementations§

Source§

impl Clone for EddaPaths

Source§

fn clone(&self) -> EddaPaths

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 EddaPaths

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

Source§

type Output = T

Should always be Self
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V