pub trait RsyncEndpointExt<This>where
This: RsyncEndpointAlg + RsyncEndpointViewAlg,{
// Required methods
fn read_endpoint(&self, input: &str) -> This::Endpoint;
fn read_transfer(
&self,
line: &str,
) -> Option<(This::Endpoint, This::Endpoint)>;
fn endpoint_remote(&self, endpoint: &This::Endpoint) -> bool;
fn endpoint_text(&self, endpoint: &This::Endpoint) -> String;
fn endpoint_name<'a>(&self, endpoint: &'a This::Endpoint) -> &'a str;
}Expand description
Derives an endpoint from what somebody submitted, and states one back.
Required Methods§
Sourcefn read_endpoint(&self, input: &str) -> This::Endpoint
fn read_endpoint(&self, input: &str) -> This::Endpoint
Reads one endpoint from the text somebody submitted.
Three shapes name a path on another machine: a daemon URL, and a machine and a path separated by a colon with nothing path-like before it. A text naming any other scheme names a resource somewhere else, and a text naming neither names a path here.
Sourcefn read_transfer(&self, line: &str) -> Option<(This::Endpoint, This::Endpoint)>
fn read_transfer(&self, line: &str) -> Option<(This::Endpoint, This::Endpoint)>
Reads one submitted line as the two ends of a transfer, when it names two.
A transfer is written the way it is run: what comes from, then what it comes to. Anything naming how rather than what — the program itself, and the arguments given to it — is already stated by the transfer, so a whole command can be submitted and still be read.
Sourcefn endpoint_remote(&self, endpoint: &This::Endpoint) -> bool
fn endpoint_remote(&self, endpoint: &This::Endpoint) -> bool
Observes whether the path rests on another machine.
Sourcefn endpoint_text(&self, endpoint: &This::Endpoint) -> String
fn endpoint_text(&self, endpoint: &This::Endpoint) -> String
States the endpoint the way the transfer program is given it.
Sourcefn endpoint_name<'a>(&self, endpoint: &'a This::Endpoint) -> &'a str
fn endpoint_name<'a>(&self, endpoint: &'a This::Endpoint) -> &'a str
Names what the path ends with, without the path that leads to it.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl<This> RsyncEndpointExt<This> for Thiswhere
This: RsyncEndpointAlg + RsyncEndpointViewAlg,
Derives an endpoint from what somebody submitted, and states one back.