pub struct PublicId {
pub id: Id,
pub url: Option<Url>,
}
Expand description
A unique ID accompanied by publically identifying data.
Fields§
§id: Id
§url: Option<Url>
Implementations§
source§impl PublicId
impl PublicId
pub fn new(id: Id, url: Url) -> Self
pub fn new_id_only(id: Id) -> Self
pub fn new_from_pubkey(v: Vec<u8>, url: Option<Url>) -> Result<Self, IdError>
pub fn new_crevid_from_base64(s: &str, url: Url) -> Result<Self, IdError>
pub fn create_trust_proof<'a>( &self, ids: impl IntoIterator<Item = &'a PublicId>, trust_level: TrustLevel, override_: Vec<OverrideItem> ) -> Result<Trust, Error>
pub fn create_package_review_proof( &self, package: PackageInfo, review: Review, override_: Vec<OverrideItem>, comment: String ) -> Result<Package, Error>
pub fn url_display(&self) -> &str
Trait Implementations§
source§impl AsRef<PublicId> for UnlockedId
impl AsRef<PublicId> for UnlockedId
source§impl<'de> Deserialize<'de> for PublicId
impl<'de> Deserialize<'de> for PublicId
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 PartialEq for PublicId
impl PartialEq for PublicId
impl Eq for PublicId
impl StructuralPartialEq for PublicId
Auto Trait Implementations§
impl Freeze for PublicId
impl RefUnwindSafe for PublicId
impl Send for PublicId
impl Sync for PublicId
impl Unpin for PublicId
impl UnwindSafe for PublicId
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.