pub struct Remote {
pub host: ArcStr,
pub username: ArcStr,
pub path: ArcStr,
pub keypair: ArcStr,
}
Expand description
SSH & Remote Repository Settings
Fields§
§host: ArcStr
github.com:22
username: ArcStr
git
path: ArcStr
Username/Repository.git
keypair: ArcStr
Must be registered at the remote
Implementations§
source§impl Remote
impl Remote
pub fn new( host: ArcStr, username: ArcStr, path: ArcStr, keypair: ArcStr ) -> Remote
sourcepub fn parse(json: &JsonFile, path: &JsonPath) -> Result<Self, &'static str>
pub fn parse(json: &JsonFile, path: &JsonPath) -> Result<Self, &'static str>
Reads remote access configuration from a JsonFile
At path
, the json file is expected to contain an
object with the following keys:
host
: SSH host (example:github.com:22
)username
: SSH username (usuallygit
)path
: path to the git repositorykeypair_hex
: 128-characters long hex-encoded key pair
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Remote
impl Send for Remote
impl Sync for Remote
impl Unpin for Remote
impl UnwindSafe for Remote
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
Mutably borrows from an owned value. Read more