emcyphal 0.1.0

Async Cyphal/CAN network stack for no_std environments
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use core::ptr::NonNull;

use super::BufferToken;
use crate::core::ServiceId;
use crate::registry::tx_resp::Entry;

mod blocking;

pub use blocking::Blocking;

pub(crate) trait SealedBuffer<T> {
    // Safety: User must drop the pointee in place before the buffer reference expired
    unsafe fn init(&mut self, service: ServiceId) -> (NonNull<Entry>, BufferToken<'_>);
}

#[allow(private_bounds)]
pub trait Buffer<T>: SealedBuffer<T> {}