pub enum PlaylistValue {
Path(PathBuf),
Url(Url),
}Variants§
Path(PathBuf)
A Local path, specific to the current running system (unix / dos)
Url(Url)
A URI / URL starting with a protocol
Implementations§
Source§impl PlaylistValue
impl PlaylistValue
Sourcepub fn file_url_to_path(&mut self) -> Result<()>
pub fn file_url_to_path(&mut self) -> Result<()>
If the current value is a PlaylistValue::Url and has the file:// protocol, convert it to a path
§Errors
If the url’s scheme is file:// but converting to a pathbuf fails, see reqwest::Url::to_file_path
Sourcepub fn absoluteize(&mut self, base: &Path)
pub fn absoluteize(&mut self, base: &Path)
If the current value is a PlaylistValue::Path and not absolute, make it absolute via the provided base
base is expected to be absolute!
Sourcepub fn try_from_str(line: &str) -> Result<Self>
pub fn try_from_str(line: &str) -> Result<Self>
Try to parse the given string
Trait Implementations§
Source§impl Clone for PlaylistValue
impl Clone for PlaylistValue
Source§fn clone(&self) -> PlaylistValue
fn clone(&self) -> PlaylistValue
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PlaylistValue
impl Debug for PlaylistValue
Source§impl Display for PlaylistValue
impl Display for PlaylistValue
Source§impl From<PathBuf> for PlaylistValue
impl From<PathBuf> for PlaylistValue
Source§impl PartialEq for PlaylistValue
impl PartialEq for PlaylistValue
impl Eq for PlaylistValue
impl StructuralPartialEq for PlaylistValue
Auto Trait Implementations§
impl Freeze for PlaylistValue
impl RefUnwindSafe for PlaylistValue
impl Send for PlaylistValue
impl Sync for PlaylistValue
impl Unpin for PlaylistValue
impl UnwindSafe for PlaylistValue
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read moreSource§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.