Struct unmp::link::Link[][src]

pub struct Link {
    pub driver: Weak<dyn Driver + Send + Sync>,
    // some fields omitted
}

链路实例描述符(Link)

Fields

driver: Weak<dyn Driver + Send + Sync>

驱动

Implementations

impl Link[src]

pub fn new(driver: Weak<dyn Driver + Send + Sync>) -> Self[src]

通过链路驱动接口(Driver)创建链路实例

pub fn destroy(&self)[src]

销毁链路

pub fn status(&self) -> Result<(), ErrorKind>[src]

链路是否有效

pub async fn send(&self, buf: &[u8]) -> Result<(), ErrorKind>[src]

调用链路实例发送负载数据

pub fn broadcast(buf: &[u8])[src]

广播负载数据到链路池中所有链路

Trait Implementations

impl Clone for Link[src]

impl Debug for Link[src]

impl Display for Link[src]

impl Eq for Link[src]

impl Ord for Link[src]

impl PartialEq<Link> for Link[src]

impl PartialOrd<Link> for Link[src]

Auto Trait Implementations

impl Send for Link

impl Sync for Link

impl Unpin for Link

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.