simploxide-client 0.10.0

SimpleX-Chat API client
Documentation
1
2
3
4
5
6
7
8
9
10
pub fn cast_file_size(file_size: u64) -> std::io::Result<usize> {
    file_size.try_into().map_err(file_is_too_large)
}

pub fn file_is_too_large<E>(reason: E) -> std::io::Error
where
    E: Into<Box<dyn std::error::Error + Send + Sync>>,
{
    std::io::Error::new(std::io::ErrorKind::FileTooLarge, reason)
}