[][src]Enum file_transfer::ftp::FTP

pub enum FTP {
    Normal(StringFile),
    Secure(StringFile),
}

Variants

Normal(StringFile)
Secure(StringFile)

Methods

impl FTP[src]

pub fn new(ip_addr: &str, file: File) -> FTP[src]

Returns and FTP with your ip and port

Parameters &str with ip and port and str with path to file

Example

let ftp = FTP::new("127.0.0.1:8080", File::create("/home/user/file.txt"));

pub fn send(self)[src]

Sends file to desiered Ip Parameter self

Example

let ftp = FTP::new("127.0.0.1:8080", File::create("/home/user/file.txt"));
ftp.send();

pub fn recv(self)[src]

Receives file and writes it to the desiered opened file

Parameter self

Example

let ftp = FTP::new("127.0.0.1:8080", File::create("/home/user/file.txt"));
ftp.send();

Auto Trait Implementations

impl RefUnwindSafe for FTP

impl Send for FTP

impl Sync for FTP

impl Unpin for FTP

impl UnwindSafe for FTP

Blanket Implementations

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

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

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

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

impl<T, U> Into<U> for T where
    U: From<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.