pub struct Domain { /* private fields */ }
Expand description
Domain of the openrank network. Consists of a trust namespace and a seed namespace + algorithm id.
Implementations§
Source§impl Domain
impl Domain
Sourcepub fn trust_owner(&self) -> &Address
pub fn trust_owner(&self) -> &Address
Address of the trust namespace owner.
Sourcepub fn seed_owner(&self) -> &Address
pub fn seed_owner(&self) -> &Address
Address of the seed namespace owner.
Source§impl Domain
impl Domain
pub fn new( trust_owner: Address, trust_id: u32, seed_owner: Address, seed_id: u32, algo_id: u64, ) -> Self
Sourcepub fn trust_namespace(&self) -> OwnedNamespace
pub fn trust_namespace(&self) -> OwnedNamespace
Returns the trust namespace of the domain.
Sourcepub fn seed_namespace(&self) -> OwnedNamespace
pub fn seed_namespace(&self) -> OwnedNamespace
Returns the seed namespace of the domain.
Sourcepub fn to_hash(&self) -> DomainHash
pub fn to_hash(&self) -> DomainHash
Returns the domain hash, created from the trust and seed namespace + algo id.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Domain
impl<'de> Deserialize<'de> for Domain
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
Auto Trait Implementations§
impl Freeze for Domain
impl RefUnwindSafe for Domain
impl Send for Domain
impl Sync for Domain
impl Unpin for Domain
impl UnwindSafe for Domain
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> 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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more