[−][src]Struct rpki::uri::Rsync
An rsync URI.
This implements a simplified form of the the rsync URI defined in RFC 5781 which in turn references RFC 3986. Only absolute URIs including an authority are allowed.
Parsing is simplified in that it only checks for the correct structure and that no forbidden characters are present.
Methods
impl Rsync
[src]
pub fn new(module: RsyncModule, path: Bytes) -> Self
[src]
pub fn from_string(s: String) -> Result<Self, Error>
[src]
pub fn from_slice(slice: &[u8]) -> Result<Self, Error>
[src]
pub fn from_bytes(bytes: Bytes) -> Result<Self, Error>
[src]
pub fn module(&self) -> &RsyncModule
[src]
pub fn to_module(&self) -> RsyncModule
[src]
pub fn path(&self) -> &str
[src]
pub fn to_string(&self) -> String
[src]
pub fn parent(&self) -> Option<Self>
[src]
pub fn join(&self, path: &[u8]) -> Self
[src]
pub fn ends_with(&self, extension: &str) -> bool
[src]
pub fn relative_to(&self, other: &Rsync) -> Option<&[u8]>
[src]
Returns some relative path of self as a sub path of other, as long as other is a parent. If self and other are the same, or equal, then the the returned slice is empty. If other is not a parent of self, then None is returned.
pub fn is_parent_of(&self, other: &Rsync) -> bool
[src]
Returns true if this uri is a directory and it contains the other uri.
pub fn encode_general_name<'a>(&'a self) -> impl Values + 'a
[src]
Trait Implementations
impl PartialEq<Rsync> for Rsync
[src]
impl Clone for Rsync
[src]
fn clone(&self) -> Rsync
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Eq for Rsync
[src]
impl Display for Rsync
[src]
impl Debug for Rsync
[src]
impl Hash for Rsync
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl FromStr for Rsync
[src]
type Err = Error
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Error>
[src]
impl<'a> PrimitiveContent for &'a Rsync
[src]
const TAG: Tag
[src]
fn encoded_len(&self, _: Mode) -> usize
[src]
fn write_encoded<W: Write>(
&self,
_mode: Mode,
target: &mut W
) -> Result<(), Error>
[src]
&self,
_mode: Mode,
target: &mut W
) -> Result<(), Error>
fn to_encoded_bytes(&self, mode: Mode) -> Bytes
[src]
Encodes the value to bytes (useful when you need to sign a structure)
fn encode(self) -> Primitive<Self>
[src]
Returns a value encoder for this content using the natural tag. Read more
fn encode_as(self, tag: Tag) -> Primitive<Self>
[src]
Returns a value encoder for this content using the given tag. Read more
fn encode_ref(&self) -> Primitive<&Self>
[src]
Returns a value encoder for a reference using the natural tag.
fn encode_ref_as(&self, tag: Tag) -> Primitive<&Self>
[src]
Returns a value encoder for a reference using the given tag.
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,