···114114 &self.inner115115 }116116117117- /// Returns the length of the DID in bytes.118118- ///119119- /// # Example120120- ///121121- /// ```rust122122- /// use atproto::did::Did;123123- ///124124- /// let did = Did::parse("did:plc:65gha4t3avpfpzmvpbwovss7").unwrap();125125- /// assert_eq!(did.len(), 32);126126- /// ```127127- ///128128- #[inline]129129- pub const fn len(&self) -> usize {130130- self.inner.len()131131- }132132-133133- /// Returns true if `self` is an empty DID, which is impossible.134134- ///135135- /// # Panics136136- ///137137- /// Panics if you've somehow managed to construct an empty [`Did`].138138- ///139139- #[inline]140140- pub const fn is_empty(&self) -> bool {141141- assert!(142142- !self.inner.is_empty(),143143- "empty DID should be impossible to construct"144144- );145145- false146146- }147147-148117 /// Convert to a `Box<Did>`.149118 pub fn into_boxed(&self) -> Box<Did> {150119 Did::new_boxed(self.inner.to_owned().into_boxed_str())