[−][src]Struct arrsync::RsyncClient
The main client struct
Implementations
impl RsyncClient
[src]
pub async fn connect<'_>(url: &'_ Url) -> Result<(RsyncClient, Vec<File>)>
[src]
Open a connection to an rsync server and read the initial file list.
The url must have scheme rsync
and contain at least one path element (module listing is
not supported).
pub async fn get<'_, '_>(&'_ self, file: &'_ File) -> Result<impl AsyncRead>
[src]
Requests the transfer of a File.
The referenced File must have been returned in the same call as self
, or an error will be
returned.
There are some worrying remarks in the rsync protocol documentation in openrsync. It is stated that requested files may be silently ommited from transfer, and that files are not necessarily transmited in the order they were requested. Effectively, this means that the only way to detect that a file wasn't sent is to invoke close, and then to wait for the sender to signal the end of the connection. Without calling close, the returned AsyncRead may remain pending forever.
pub async fn close<'_>(&'_ mut self) -> Result<Stats>
[src]
Finalizes the connection and returns statistics about the transfer (See Stats). All files that have allready been requested will be transferred before the returned future completes. Only one call to this function can succeed per RsyncClient.
Trait Implementations
impl Clone for RsyncClient
[src]
fn clone(&self) -> RsyncClient
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl !RefUnwindSafe for RsyncClient
impl Send for RsyncClient
impl Sync for RsyncClient
impl Unpin for RsyncClient
impl !UnwindSafe for RsyncClient
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,