pub struct Dependency { /* private fields */ }Expand description
Зависимость модуля: состояние соседа, которого проверяет зонд. Дескриптор копируется и всегда даёт последнее состояние. Создаётся при регистрации в контексте модуля.
Implementations§
Source§impl Dependency
impl Dependency
Sourcepub fn new(
module: &'static str,
name: impl Into<String>,
receiver: Receiver<DependencyInfo>,
) -> Dependency
pub fn new( module: &'static str, name: impl Into<String>, receiver: Receiver<DependencyInfo>, ) -> Dependency
Зависимость name модуля module, состояние которой публикуется в receiver.
Sourcepub fn info(&self) -> DependencyInfo
pub fn info(&self) -> DependencyInfo
Последнее состояние.
Sourcepub fn state(&self) -> DependencyState
pub fn state(&self) -> DependencyState
Доступность соседа и стадия инициализации.
Sourcepub fn subscribe(&self) -> Receiver<DependencyInfo>
pub fn subscribe(&self) -> Receiver<DependencyInfo>
Канал изменений состояния.
Sourcepub fn is_same(&self, other: &Dependency) -> bool
pub fn is_same(&self, other: &Dependency) -> bool
Та же зависимость: тот же модуль и то же имя.
Trait Implementations§
Source§impl Clone for Dependency
impl Clone for Dependency
Source§fn clone(&self) -> Dependency
fn clone(&self) -> Dependency
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Dependency
impl Debug for Dependency
Auto Trait Implementations§
impl Forget for Dependency
impl Freeze for Dependencywhere
&'static str: Freeze,
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const ArcInner<Shared<DependencyInfo>> is !null: Freeze,
PhantomData<ArcInner<Shared<DependencyInfo>>>: Freeze,
impl Move for Dependency
impl RefUnwindSafe for Dependencywhere
Atomic<usize>: RefUnwindSafe,
RwLock<DependencyInfo>: RefUnwindSafe,
AtomicUsize: RefUnwindSafe,
Notify: RefUnwindSafe,
impl Send for Dependency
impl Sync for Dependency
impl Unpin for Dependency
impl UnsafeUnpin for Dependencywhere
&'static str: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const ArcInner<Shared<DependencyInfo>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Shared<DependencyInfo>>>: UnsafeUnpin,
impl UnwindSafe for Dependency
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request