pub struct EspHomeServer { /* private fields */ }
Implementations§
Source§impl EspHomeServer
impl EspHomeServer
Sourcepub fn builder() -> EspHomeServerBuilder<((Arc<AtomicBool>,), (Vec<u8>,), (), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> EspHomeServerBuilder<((Arc<AtomicBool>,), (Vec<u8>,), (), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building EspHomeServer
.
On the builder, call .name(...)
, .password(...)
(optional), .encryption_key(...)
(optional), .api_version_major(...)
(optional), .api_version_minor(...)
(optional), .server_info(...)
(optional), .friendly_name(...)
(optional), .mac(...)
(optional), .model(...)
(optional), .manufacturer(...)
(optional), .suggested_area(...)
(optional), .bluetooth_mac_address(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of EspHomeServer
.
Source§impl EspHomeServer
impl EspHomeServer
Sourcepub async fn start(
&mut self,
tcp_stream: TcpStream,
) -> Result<(Sender<ProtoMessage>, Receiver<ProtoMessage>), Box<dyn Error>>
pub async fn start( &mut self, tcp_stream: TcpStream, ) -> Result<(Sender<ProtoMessage>, Receiver<ProtoMessage>), Box<dyn Error>>
Easier Version of the api abstraction Handles:
- internal entity key management
pub fn add_entity(&mut self, entity_id: &str, entity: Entity)
Auto Trait Implementations§
impl Freeze for EspHomeServer
impl !RefUnwindSafe for EspHomeServer
impl Send for EspHomeServer
impl Sync for EspHomeServer
impl Unpin for EspHomeServer
impl !UnwindSafe for EspHomeServer
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