Skip to main content

GitwayConfigBuilder

Struct GitwayConfigBuilder 

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

Builder for GitwayConfig.

Obtained via GitwayConfig::builder.

Implementations§

Source§

impl GitwayConfigBuilder

Source

pub fn port(self, port: u16) -> Self

Override the target SSH port (default: 22, FR-1).

Source

pub fn username(self, username: impl Into<String>) -> Self

Override the remote username (default: "git", FR-13).

Source

pub fn identity_file(self, path: impl Into<PathBuf>) -> Self

Set an explicit identity file path (FR-9 — highest priority).

Source

pub fn cert_file(self, path: impl Into<PathBuf>) -> Self

Set an OpenSSH certificate path (FR-12).

Source

pub fn skip_host_check(self, skip: bool) -> Self

Disable host-key verification. Use only for emergencies (FR-8).

Source

pub fn inactivity_timeout(self, timeout: Duration) -> Self

Override the session inactivity timeout (FR-5).

Source

pub fn custom_known_hosts(self, path: impl Into<PathBuf>) -> Self

Path to a custom known_hosts-style file for self-hosted instances (FR-7).

Source

pub fn verbose(self, verbose: bool) -> Self

Enable verbose debug logging.

Source

pub fn fallback(self, fallback: Option<(String, u16)>) -> Self

Override the fallback host/port. Pass None to disable fallback.

Source

pub fn build(self) -> GitwayConfig

Finalise and return the GitwayConfig.

Trait Implementations§

Source§

impl Debug for GitwayConfigBuilder

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> 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, 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