pub struct ItchApiUrl { /* private fields */ }Expand description
An itch.io API address
Use the Other variant with the full URL when it isn’t a known API version
Implementations§
Source§impl<'a> ItchApiUrl
impl<'a> ItchApiUrl
Sourcepub fn from_api_endpoint(
version: ItchApiVersion,
endpoint: impl Into<Cow<'a, str>>,
) -> Self
pub fn from_api_endpoint( version: ItchApiVersion, endpoint: impl Into<Cow<'a, str>>, ) -> Self
Creates an ItchApiUrl by combining the API version with an endpoint path
V1 and V2 prepend their base URLs
Other uses the endpoint as-is
Sourcepub fn get_version(&self) -> ItchApiVersion
pub fn get_version(&self) -> ItchApiVersion
Returns the API version of this ItchApiUrl
Trait Implementations§
Source§impl Clone for ItchApiUrl
impl Clone for ItchApiUrl
Source§fn clone(&self) -> ItchApiUrl
fn clone(&self) -> ItchApiUrl
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 ItchApiUrl
impl Debug for ItchApiUrl
Source§impl<'de> Deserialize<'de> for ItchApiUrl
impl<'de> Deserialize<'de> for ItchApiUrl
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ItchApiUrl
impl Display for ItchApiUrl
Source§impl PartialEq for ItchApiUrl
impl PartialEq for ItchApiUrl
Source§impl Serialize for ItchApiUrl
impl Serialize for ItchApiUrl
impl StructuralPartialEq for ItchApiUrl
Auto Trait Implementations§
impl Freeze for ItchApiUrl
impl RefUnwindSafe for ItchApiUrl
impl Send for ItchApiUrl
impl Sync for ItchApiUrl
impl Unpin for ItchApiUrl
impl UnwindSafe for ItchApiUrl
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<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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§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.