pub struct Dns { /* private fields */ }Expand description
Подключение к сервису DNS, получающее пакеты на выбранных стадиях. Перехват прекращается при уничтожении значения.
Implementations§
Source§impl Dns
impl Dns
Sourcepub async fn connect<F>(
runtime: &GnunetRuntime,
config: &Config,
flags: DnsFlags,
handler: F,
) -> Result<Self, DnsError>
pub async fn connect<F>( runtime: &GnunetRuntime, config: &Config, flags: DnsFlags, handler: F, ) -> Result<Self, DnsError>
Подключается к сервису DNS и начинает получать пакеты на стадиях
flags. handler получает пакет в сыром виде и DnsActionContext
для решения. Он вызывается в потоке планировщика и не должен
блокироваться.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Dns
impl !UnwindSafe for Dns
impl Freeze for Dns
impl Send for Dns
impl Sync for Dns
impl Unpin for Dns
impl UnsafeUnpin for Dns
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