//! BER serialization and deserialization helpers for COSEM interface classes.
use crateInterfaceClass;
use crateBerError;
/// Serializes a COSEM object into BER.
///
/// # Arguments
/// * `obj` - An object implementing the `InterfaceClass` trait.
///
/// # Returns
/// * `Ok(Vec<u8>)` - The serialized bytes.
/// * `Err(BerError)` - On a serialization error.
/// Deserializes a COSEM object from BER data.
///
/// # Arguments
/// * `obj` - An object implementing the `InterfaceClass` trait, into which the
/// deserialized state is written.
/// * `data` - The input BER bytes.
///
/// # Returns
/// * `Ok(())` - On success.
/// * `Err(BerError)` - On a deserialization error.