[][src]Struct automaat_processor_git_clone::GitClone

pub struct GitClone {
    pub url: Url,
    pub username: Option<String>,
    pub password: Option<String>,
    pub path: Option<String>,
}

The processor configuration.

Fields

url: Url

The URL of the remote to fetch the repository from.

username: Option<String>

The optional username used to authenticate with the remote.

password: Option<String>

The optional password used to authenticate with the remote.

path: Option<String>

An optional path inside the workspace to clone the repository to. If no path is given, the root of the workspace is used. If the path does not exist, it will be created.

Trait Implementations

impl Eq for GitClone[src]

impl PartialEq<GitClone> for GitClone[src]

impl Clone for GitClone[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for GitClone[src]

impl<'a> Processor<'a> for GitClone[src]

type Error = Error

If a processor fails its intended purpose, the returned error is turned into a string, and shown in the automaat-web-client application. Read more

type Output = String

The processor can return any (successful) output it wants, as long as that type implements the [std::fmt::Display] trait. Read more

fn validate(&self) -> Result<(), Self::Error>[src]

Validate the GitClone configuration.

Errors

This method returns an error under the following circumstances:

  • If a path option is provided that contains anything other than a simple relative path such as my/path. Anything such as ../, or /etc is not allowed. The returned error is of type Error::Path.

In a future update, this will also validate remote connectivity.

fn run(&self, context: &Context) -> Result<Option<Self::Output>, Self::Error>[src]

Clone the repository as defined by the provided configuration.

The repository will be cloned in the automaat_core::Context workspace, optionally in a child path.

Output

None is returned if the processor runs successfully.

Errors

Any errors during cloning will return an Error::Git result value.

impl<'de> Deserialize<'de> for GitClone[src]

impl Serialize for GitClone[src]

Auto Trait Implementations

impl Send for GitClone

impl Sync for GitClone

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]