pub struct Remote {
pub index: usize,
pub user: String,
pub password: String,
pub ip: String,
pub port: u16,
pub authorized: bool,
pub name: Option<String>,
pub note: Option<String>,
}Fields§
§index: usizethe index of the remote server.
user: Stringthe login user.
password: Stringthe login password.
ip: Stringthe login id address.
port: u16the login port.
have the authorized to login.
name: Option<String>the alias name for the login.
note: Option<String>the note for the server.
Implementations§
Source§impl Remote
impl Remote
pub fn add_record(&self) -> Result<usize>
pub fn delete_record(&self) -> Result<()>
pub async fn add_auth(&self) -> Result<()>
pub async fn remove_auth(&self) -> Result<()>
pub async fn login(&self, reauth: bool) -> Result<()>
pub async fn upload(&self, from: &str, to: &str) -> Result<()>
pub async fn download(&self, from: &str, to: &str) -> Result<()>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Remote
impl<'de> Deserialize<'de> for Remote
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Remote
impl RefUnwindSafe for Remote
impl Send for Remote
impl Sync for Remote
impl Unpin for Remote
impl UnsafeUnpin 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