message: Implement `DataSize` for `small_network::Error`
diff: @@ -7,6 +7,7 @@ use std::{
  time::SystemTimeError,
  };
  +use datasize::DataSize;
  use openssl::{error::ErrorStack, ssl};
  use serde::Serialize;
  use thiserror::Error;
  @@ -141,6 +142,18 @@ pub enum Error {
  ),
  }
  +// Manual implementation for `DataSize` - the type contains too many FFI variants that are hard to
  +// size, so we give up on estimating it altogether.
  +impl DataSize for Error {
  + const IS_DYNAMIC: bool = false;
  +
  + const STATIC_HEAP_SIZE: usize = 0;
  +
  + fn estimate_heap_size(&self) -> usize {
  + 0
  + }
  +}
  +
  /// An error formatter.
  #[derive(Clone, Copy, Debug)]
  pub(crate) struct ErrFormatter<'a, T>(pub &'a T);
  