···88/// This is an _unsized_ type similiar to [`str`], so must always be used behind a pointer like99/// `&` or [`Box`].1010///1111-/// For an owned variant use [`OwnedDid`].1111+/// For an owned variant use [`DidBuf`].1212///1313/// See: <https://atproto.com/specs/did>1414#[derive(Hash, PartialEq, Eq, PartialOrd, Ord)]···3535 /// # Example3636 ///3737 /// ```rust3838- /// use atproto::did::Did;3838+ /// use gordian_types::Did;3939 ///4040 /// let did = Did::parse("did:plc:65gha4t3avpfpzmvpbwovss7").unwrap();4141 /// assert_eq!(did.typ(), "did");···5757 /// # Example5858 ///5959 /// ```rust6060- /// use atproto::did::Did;6060+ /// use gordian_types::Did;6161 ///6262 /// let did = Did::parse("did:plc:65gha4t3avpfpzmvpbwovss7").unwrap();6363 /// assert_eq!(did.typ(), "did");···7979 /// # Example8080 ///8181 /// ```rust8282- /// use atproto::did::Did;8282+ /// use gordian_types::Did;8383 ///8484 /// let did = Did::parse("did:plc:65gha4t3avpfpzmvpbwovss7").unwrap();8585 /// assert_eq!(did.method(), "plc");···9898 /// # Example9999 ///100100 /// ```rust101101- /// use atproto::did::Did;101101+ /// use gordian_types::Did;102102 ///103103 /// let did = Did::parse("did:plc:65gha4t3avpfpzmvpbwovss7").unwrap();104104 /// assert_eq!(did.ident(), "65gha4t3avpfpzmvpbwovss7");···176176 // @TODO Validate percent encoding in ident.177177}178178179179-/// Length in bytes an [`OwnedDid`] can be before being allocated on the heap.179179+/// Length in bytes an [`DidBuf`] can be before being allocated on the heap.180180///181181// Assume most DIDs are PLC method, and this DID is a typical length.182182const DID_PLC_LEN: usize = "did:plc:65gha4t3avpfpzmvpbwovss7".len();···195195 Self { inner }196196 }197197198198- /// Construct an `OwnedDid` from a `&'static str`.198198+ /// Construct an `DidBuf` from a `&'static str`.199199 ///200200 /// # Panics201201 ///···208208 Self { inner }209209 }210210211211- /// Parse an `OwnedDid` from a `str`.211211+ /// Parse a `DidBuf` from a `str`.212212 ///213213 /// # Example214214 ///215215 /// ```rust216216- /// use atproto::did::OwnedDid;216216+ /// use gordian_types::DidBuf;217217 ///218218- /// let did = OwnedDid::parse("did:plc:65gha4t3avpfpzmvpbwovss7").unwrap();218218+ /// let did = DidBuf::parse("did:plc:65gha4t3avpfpzmvpbwovss7").unwrap();219219 /// assert_eq!(did.typ(), "did");220220 /// assert_eq!(did.method(), "plc");221221 /// assert_eq!(did.ident(), "65gha4t3avpfpzmvpbwovss7");
+1-1
crates/gordian-types/src/handle.rs
···2929 /// # Example3030 ///3131 /// ```rust3232- /// use atproto::Handle;3232+ /// use gordian_types::Handle;3333 ///3434 /// let handle = Handle::parse("tjh.dev").expect("'tjh.dev' is a valid handle");3535 /// assert_eq!(handle, "tjh.dev");
+2-2
crates/gordian-types/src/nsid.rs
···3333 /// # Example3434 ///3535 /// ```rust3636- /// use atproto::Nsid;3636+ /// use gordian_types::Nsid;3737 ///3838 /// const NSID: &Nsid = unsafe { Nsid::from_static_unchecked("com.atproto.sync.getRecord") };3939 /// ```···5252 /// # Example5353 ///5454 /// ```rust5555- /// use atproto::Nsid;5555+ /// use gordian_types::Nsid;5656 ///5757 /// let nsid = Nsid::parse("app.bsky.actor.profile").unwrap();5858 /// ```