Skip to content

Instantly share code, notes, and snippets.

@jamesmunns
Created January 11, 2022 10:25
Show Gist options
  • Save jamesmunns/77416ddb83d7f0ff4399e29d3cd4bead to your computer and use it in GitHub Desktop.
Save jamesmunns/77416ddb83d7f0ff4399e29d3cd4bead to your computer and use it in GitHub Desktop.
➜ firmware git:(featherwing) ✗ rg 'const.*: usize' ../submodules/protocol/
../submodules/protocol/server/src/lib.rs
25:type ClientStore<const N: usize, const SZ: usize> = Vec<Client<N, SZ>, 8>;
40:pub struct Broker<const N: usize, const SZ: usize> {
56:pub const fn reset_msg<const N: usize, const SZ: usize>() -> Arbitrator<'static, N, SZ> {
64:impl<const N: usize, const SZ: usize> Broker<N, SZ> {
198:impl<const N: usize, const SZ: usize> Broker<N, SZ> {
265:struct Client<const N: usize, const SZ: usize> {
270:impl<const N: usize, const SZ: usize> Client<N, SZ> {
408:enum ClientState<const N: usize, const SZ: usize> {
413:impl<const N: usize, const SZ: usize> ClientState<N, SZ> {
430:struct ConnectedState<const N: usize, const SZ: usize> {
438:struct Shortcut<const N: usize, const SZ: usize> {
447:pub struct Request<'a, const N: usize, const SZ: usize> {
456:pub struct Response<'a, const N: usize, const SZ: usize> {
467:pub trait ServerIoIn<const N: usize, const SZ: usize> {
471:pub trait ServerIoOut<const N: usize, const SZ: usize> {
475:impl<'resp, const N: usize, const SZ: usize, const CT: usize> ServerIoOut<N, SZ> for Vec<Response<'static, N, SZ>, CT>
../submodules/protocol/client/src/lib.rs
39:pub struct RecvMsg<T: Table<N, SZ>, const N: usize, const SZ: usize> {
47:pub struct SendMsg<'a, const N: usize, const SZ: usize> {
../submodules/protocol/icd/src/arbitrator.rs
20:pub enum Arbitrator<'a, const N: usize, const SZ: usize> {
58:pub enum PubSubResponse<'a, const N: usize, const SZ: usize> {
81:pub struct SubMsg<'a, const N: usize, const SZ: usize> {
../submodules/protocol/icd/src/component.rs
20:pub enum Component<'a, const N: usize, const SZ: usize> {
41:pub struct PubSub<'a, const N: usize, const SZ: usize> {
55:pub enum PubSubType<'a, const N: usize, const SZ: usize> {
81:pub struct Control<'a, const N: usize, const SZ: usize> {
100:pub enum ControlType<'a, const N: usize, const SZ: usize> {
121:pub struct ComponentInfo<'a, const N: usize, const SZ: usize> {
133:pub struct PubSubShort<'a, const N: usize, const SZ: usize> {
../submodules/protocol/client/src/table.rs
28:pub trait Table<const N: usize, const SZ: usize>: Sized {
../submodules/protocol/icd/src/lib.rs
25:pub const MAX_PATH_LEN: usize = 127;
28:pub const MAX_NAME_LEN: usize = 32;
33:pub enum PubSubPath<'a, const N: usize, const SZ: usize> {
64:pub type Path<'a, const N: usize, const SZ: usize> = ManagedArcStr<'a, N, SZ>;
67:pub type Name<'a, const N: usize, const SZ: usize> = ManagedArcStr<'a, N, SZ>;
../submodules/protocol/client/src/client_io.rs
38:pub struct RecvPayload<const N: usize, const SZ: usize> {
44:pub trait ClientIo<const N: usize, const SZ: usize> {
../submodules/protocol/client/src/client.rs
54:pub struct Client<const N: usize, const SZ: usize> {
68:impl<const N: usize, const SZ: usize> Client<N, SZ> {
326:impl<const N: usize, const SZ: usize> Client<N, SZ> {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment