pub struct Abd { /* private fields */ }Expand description
Соединение с GNUnet ABD (attribute-based delegation). Незавершённые запросы C-клиент повторяет после переподключения; drop Future отменяет запрос.
Implementations§
Source§impl Abd
impl Abd
Sourcepub async fn connect(
runtime: &GnunetRuntime,
config: &Config,
) -> Result<Self, AbdError>
pub async fn connect( runtime: &GnunetRuntime, config: &Config, ) -> Result<Self, AbdError>
Подключается к сервису ABD.
Sourcepub async fn verify(
&self,
issuer: &PublicKey,
issuer_attribute: &str,
subject: &PublicKey,
delegates: &[AbdDelegate],
direction: AbdDirection,
) -> Result<Option<AbdChain>, AbdError>
pub async fn verify( &self, issuer: &PublicKey, issuer_attribute: &str, subject: &PublicKey, delegates: &[AbdDelegate], direction: AbdDirection, ) -> Result<Option<AbdChain>, AbdError>
Проверяет, что subject обладает атрибутом issuer.issuer_attribute,
опираясь на предъявленные delegates. None — цепочка не найдена.
Sourcepub async fn collect(
&self,
issuer: &PublicKey,
issuer_attribute: &str,
subject: &PrivateKey,
direction: AbdDirection,
) -> Result<Option<AbdChain>, AbdError>
pub async fn collect( &self, issuer: &PublicKey, issuer_attribute: &str, subject: &PrivateKey, direction: AbdDirection, ) -> Result<Option<AbdChain>, AbdError>
Собирает delegates субъекта (он — владелец subject), составляющие
цепочку до issuer.issuer_attribute. None — цепочка не найдена.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Abd
impl !UnwindSafe for Abd
impl Freeze for Abd
impl Send for Abd
impl Sync for Abd
impl Unpin for Abd
impl UnsafeUnpin for Abd
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