postcard-bindgen-core 0.6.1

A crate to generate bindings for the postcard binary format for other languages than Rust - Core Crate
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use super::variable_path::{VariableAccess, VariablePath};

#[derive(Clone)]
pub enum AvailableCheck<L> {
    Object(VariablePath<L>, String),
    None,
}

impl<L> AvailableCheck<L> {
    pub fn from_variable_path(path: VariablePath<L>) -> Self {
        let (path, last) = path.modify_pop();
        match last {
            Some(VariableAccess::Field(name)) => Self::Object(path, name),
            _ => Self::None,
        }
    }
}