Skip to main content

Abd

Struct Abd 

Source
pub struct Abd { /* private fields */ }
Expand description

Соединение с GNUnet ABD (attribute-based delegation). Незавершённые запросы C-клиент повторяет после переподключения; drop Future отменяет запрос.

Implementations§

Source§

impl Abd

Source

pub async fn connect( runtime: &GnunetRuntime, config: &Config, ) -> Result<Self, AbdError>

Подключается к сервису ABD.

Source

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 — цепочка не найдена.

Source

pub async fn collect( &self, issuer: &PublicKey, issuer_attribute: &str, subject: &PrivateKey, direction: AbdDirection, ) -> Result<Option<AbdChain>, AbdError>

Собирает delegates субъекта (он — владелец subject), составляющие цепочку до issuer.issuer_attribute. None — цепочка не найдена.

Source

pub async fn close(self) -> Result<(), AbdError>

Отменяет незавершённые запросы и дожидается локального GNUNET_ABD_disconnect.

Trait Implementations§

Source§

impl Drop for Abd

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.