pub struct ApUri { /* private fields */ }Expand description
A portable object’s identifier.
Implementations§
Source§impl ApUri
impl ApUri
Sourcepub fn parse(iri: &str) -> Option<Self>
pub fn parse(iri: &str) -> Option<Self>
Read iri in any of its spellings; None when it is not a portable
object’s identifier.
Sourcepub fn new(did: &str, path: &str) -> Option<Self>
pub fn new(did: &str, path: &str) -> Option<Self>
The identifier path names under did; None when did is not a
DID or path does not start with /.
Sourcepub fn gateways(&self) -> &[String]
pub fn gateways(&self) -> &[String]
Where the identifier says the object may be fetched: its @gateway
hints, or the gateway a compatible identifier was served by.
Sourcepub fn canonical(&self) -> String
pub fn canonical(&self) -> String
ap://did/path#fragment: the form identifiers are compared in, and
the one Ojak writes.
Sourcepub fn encoded(&self) -> String
pub fn encoded(&self) -> String
The canonical form with the DID’s colons percent-encoded: the spelling an RFC 3986 parser accepts, for where a type needs an IRI.
Sourcepub fn with_hints(&self, gateways: &[&str]) -> String
pub fn with_hints(&self, gateways: &[&str]) -> String
The canonical form with gateways as location hints, as a reference
to another actor is written.
Sourcepub fn at_gateway(&self, gateway: &str) -> String
pub fn at_gateway(&self, gateway: &str) -> String
Where gateway, an origin such as https://server.example, serves
this object: the compatible identifier, without its fragment.
Trait Implementations§
impl Eq for ApUri
Auto Trait Implementations§
impl Freeze for ApUri
impl RefUnwindSafe for ApUri
impl Send for ApUri
impl Sync for ApUri
impl Unpin for ApUri
impl UnsafeUnpin for ApUri
impl UnwindSafe for ApUri
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.