pub struct Converter<'a> { /* private fields */ }Implementations§
Source§impl<'a> Converter<'a>
impl<'a> Converter<'a>
Sourcepub fn new(posts_root: &'a Url, base: &str) -> Result<Converter<'a>, ParseError>
pub fn new(posts_root: &'a Url, base: &str) -> Result<Converter<'a>, ParseError>
Constructs a new Converter
§Arguments
posts_url- the URL prefix for posts.base- the relative path fromposts_urlfrom which target URLs will be converted.
pub fn convert(&self, url: &str) -> Result<String, ParseError>
Auto Trait Implementations§
impl<'a> Freeze for Converter<'a>
impl<'a> RefUnwindSafe for Converter<'a>
impl<'a> Send for Converter<'a>
impl<'a> Sync for Converter<'a>
impl<'a> Unpin for Converter<'a>
impl<'a> UnsafeUnpin for Converter<'a>
impl<'a> UnwindSafe for Converter<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more