INNER CODE UNIT · Rust
id_as_animals
szabodanika/microbin · src/pasta.rs:96
pub fn id_as_animals(&self) -> String {
if ARGS.hash_ids {
to_hashids(self.id)
} else {
to_animal_names(self.id)
}
}
pub fn has_file(&self) -> bool {
self.file.is_some()
}
pub fn total_size_as_string(&self) -> String {
let mut total_size_bytes = self.content.as_bytes().len();
if let Some(file) = &self.file {
total_size_bytes += file.size.as_u64() as usize;
}
if let Some(attachments) = &self.attachments {