Skip to main content

TendrilsActor

Struct TendrilsActor 

Source
pub struct TendrilsActor {}

Trait Implementations§

Source§

impl TendrilsApi for TendrilsActor

Source§

fn get_default_repo_path(&self) -> Result<Option<PathBuf>, GetConfigError>

Returns the default-repo-path value stored in ~/.tendrils/global-config.json or any errors that occur. Returns None if the value is blank or absent, or if the config file does not exist. Note: This does not check whether the folder is a tendrils repo.
Source§

fn get_default_profiles(&self) -> Result<Option<Vec<String>>, GetConfigError>

Returns the default-profiles stored in ~/.tendrils/global-config.json or any errors that occur. Returns None if the value is blank or absent, or if the config file does not exist.
Source§

fn init_tendrils_repo( &self, dir: &UniPath, force: bool, ) -> Result<(), InitError>

Initializes a Tendrils repo with a .tendrils folder and a pre-populated tendrils.json file. This will fail if the folder is already a Tendrils repo or if there are general file-system errors. This will also fail if the folder is not empty and force is false. Read more
Source§

fn is_tendrils_repo(&self, dir: &UniPath) -> bool

Returns true if the given folder is a Tendrils repo, otherwise false. Read more
Source§

fn list_tendrils( &self, td_repo: Option<&UniPath>, filter: FilterSpec, ) -> Result<Vec<TendrilReport<ListLog>>, SetupError>

Source§

fn tendril_action_updating<U>( &self, updater: U, mode: ActionMode, td_repo: Option<&UniPath>, filter: FilterSpec, dry_run: bool, force: bool, ) -> Result<(), SetupError>

Reads the tendrils.json file in the given Tendrils repo, and performs the action on each tendril that matches the filter. Read more
Source§

fn tendril_action( &self, mode: ActionMode, td_repo: Option<&UniPath>, filter: FilterSpec, dry_run: bool, force: bool, ) -> Result<Vec<TendrilReport<ActionLog>>, SetupError>

Same behaviour as tendril_action_updating except reports are only returned once all actions have completed.

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.