#[non_exhaustive]pub struct JmapUrl(/* private fields */);Expand description
A plain JMAP URL — no RFC 6570 template variables expected.
This is the typed counterpart to JmapUrlTemplate (which requires
expansion before use). The Session document distinguishes the two at
the type level so callers cannot accidentally pass an unexpanded
template (e.g. https://server/download/{accountId}/{blobId}/{name})
to a function that wants a plain URL.
Construct via JmapUrl::new. The string is taken as-is — no URL
parsing or validation; downstream consumers (reqwest, http crate)
validate at the actual request site. Borrow the inner string via
as_str for &str-accepting APIs.
Deliberately does NOT implement Deref<Target = str>. Auto-coercion
would defeat the type distinction with JmapUrlTemplate: both
would coerce to &str and pass any &str-accepting function. Use
.as_str() at the call site so the type transition is visible in
code review.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for JmapUrl
impl<'de> Deserialize<'de> for JmapUrl
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>,
impl Eq for JmapUrl
impl StructuralPartialEq for JmapUrl
Auto Trait Implementations§
impl Freeze for JmapUrl
impl RefUnwindSafe for JmapUrl
impl Send for JmapUrl
impl Sync for JmapUrl
impl Unpin for JmapUrl
impl UnsafeUnpin for JmapUrl
impl UnwindSafe for JmapUrl
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.