[][src]Trait unicom::Backend

pub trait Backend {
    fn name(&self) -> &str;
fn description(&self) -> &str;
fn connector(&self, url: &Url) -> Option<BoxedConnector>; }

Backend interface

Required methods

fn name(&self) -> &str

The name of backend

Examples: tcp, serial.

fn description(&self) -> &str

The backend description

fn connector(&self, url: &Url) -> Option<BoxedConnector>

Create connector

This method should check URL and extract connection options from it.

Method returns connector instance when URL is compatible with backend.

Loading content...

Implementors

impl<T> Backend for T where
    T: Deref<Target = dyn Backend>, 
[src]

Loading content...