diff options
author | Keuin <[email protected]> | 2022-03-28 00:06:58 +0800 |
---|---|---|
committer | Keuin <[email protected]> | 2022-03-28 00:11:45 +0800 |
commit | b611e395a2d002c0696c2c10e2f43b3f9013c6d9 (patch) | |
tree | 0d1e1ea4ce417022ac556b15330112aa2e7fed04 /src/user.rs | |
parent | ab4b8903ee9b009c3e1a188f1cfe09e39272d2ee (diff) |
Decent logging. Configurable log level.v0.2.0
Diffstat (limited to 'src/user.rs')
-rw-r--r-- | src/user.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/user.rs b/src/user.rs index aef43fa..fb4adc7 100644 --- a/src/user.rs +++ b/src/user.rs @@ -1,6 +1,16 @@ +use std::fmt; +use std::fmt::Formatter; + pub struct User { pub id: u64, pub name: String, pub token: String, pub chat_id: u64, +} + +impl fmt::Display for User { + fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { + write!(f, "User {{ id={}, name={}, token={}, chat_id={} }}", + self.id, self.name, self.token, self.chat_id) + } }
\ No newline at end of file |