server: Upgrade ldap3_proto
This commit is contained in:
committed by
nitnelave
parent
99ed6eface
commit
1598f096e9
@@ -272,7 +272,7 @@ impl ValueType for UserId {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Eq, Clone, Debug, Serialize, Deserialize)]
|
||||
#[derive(PartialEq, Eq, Clone, Serialize, Deserialize)]
|
||||
pub struct JpegPhoto(#[serde(with = "serde_bytes")] Vec<u8>);
|
||||
|
||||
impl From<JpegPhoto> for Value {
|
||||
@@ -332,6 +332,19 @@ impl From<&JpegPhoto> for String {
|
||||
}
|
||||
}
|
||||
|
||||
impl std::fmt::Debug for JpegPhoto {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
let mut encoded = base64::engine::general_purpose::STANDARD.encode(&self.0);
|
||||
if encoded.len() > 100 {
|
||||
encoded.truncate(100);
|
||||
encoded.push_str(" ...");
|
||||
};
|
||||
f.debug_tuple("JpegPhoto")
|
||||
.field(&format!("b64[{}]", encoded))
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
impl JpegPhoto {
|
||||
pub fn is_empty(&self) -> bool {
|
||||
self.0.is_empty()
|
||||
|
||||
Reference in New Issue
Block a user