ble-peripheral-rust 0.2.0

A cross-platform Rust crate for building Bluetooth Low Energy peripherals
Documentation
use futures::channel::mpsc::SendError;

use crate::error::{Error, ErrorType};

impl From<windows::core::Error> for Error {
    fn from(value: windows::core::Error) -> Self {
        Error::new(
            format!("windows::core::Error: {:?}", value.code()),
            format!("{:?}", value),
            ErrorType::Windows,
        )
    }
}

impl From<SendError> for Error {
    fn from(value: SendError) -> Self {
        Error::new(
            "futures::channel::mpsc::SendError",
            format!("{:?}", value).as_str(),
            ErrorType::Windows,
        )
    }
}