Skip to main content

lash_remote_protocol/protocol/
version.rs

1pub const REMOTE_PROTOCOL_VERSION: u32 = 5;
2
3pub fn ensure_protocol_version(actual: u32) -> Result<(), RemoteProtocolError> {
4    if actual == REMOTE_PROTOCOL_VERSION {
5        Ok(())
6    } else {
7        Err(RemoteProtocolError::UnsupportedProtocolVersion {
8            actual,
9            expected: REMOTE_PROTOCOL_VERSION,
10        })
11    }
12}