[][src]Trait hap::transport::Transport

pub trait Transport {
    fn start(&mut self) -> Result<(), Error>;
fn stop(&self) -> Result<(), Error>;
fn add_accessory<A: 'static + AccessoryListMember + Send>(
        &mut self,
        accessory: A
    ) -> Result<AccessoryListPtr, Error>;
fn remove_accessory(
        &mut self,
        accessory: &AccessoryListPtr
    ) -> Result<(), Error>; }

Transport is implemented by the transport methods HAP supports. Currently, that's just IpTransport.

Required methods

fn start(&mut self) -> Result<(), Error>

Starts the transport.

fn stop(&self) -> Result<(), Error>

Stops the transport.

fn add_accessory<A: 'static + AccessoryListMember + Send>(
    &mut self,
    accessory: A
) -> Result<AccessoryListPtr, Error>

Adds an Accessory to the transport and returns a pointer to the added Accessory.

fn remove_accessory(
    &mut self,
    accessory: &AccessoryListPtr
) -> Result<(), Error>

Takes a pointer to an Accessory and removes the Accessory from the transport.

Loading content...

Implementors

impl Transport for IpTransport<FileStorage>[src]

Loading content...