[][src]Struct rpki::uri::Rsync

pub struct Rsync { /* fields omitted */ }

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_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_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

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.

impl<'a> PrimitiveContent for &'a Rsync[src]

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

impl Send for Rsync

impl Sync for Rsync

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.