pub trait Serder:
Any
+ Send
+ Sync {
Show 16 methods
// Required methods
fn pretty(&self, size: Option<usize>) -> String;
fn raw(&self) -> &[u8] ⓘ;
fn sad(&self) -> Sadder;
fn genus(&self) -> &str;
fn gvrsn(&self) -> &Versionage;
fn kind(&self) -> &Kinds;
fn proto(&self) -> &str;
fn vrsn(&self) -> &Versionage;
fn size(&self) -> usize;
fn said(&self) -> Option<&str>;
fn ilk(&self) -> Option<&str>;
fn as_any(&self) -> &dyn Any;
fn clone_box(&self) -> Box<dyn Serder>;
// Provided methods
fn protocol(&self) -> &str { ... }
fn version(&self) -> &Versionage { ... }
fn saidb(&self) -> Option<Vec<u8>> { ... }
}Expand description
Trait representing a serializable/deserializable entity with SAID (Self-Addressing IDentifier)
Required Methods§
Sourcefn pretty(&self, size: Option<usize>) -> String
fn pretty(&self, size: Option<usize>) -> String
Returns a pretty-printed JSON representation of the serialized data
§Parameters
size- Optional size limit for the output. None means no limit. This protects against syslog errors when exceeding UDP MTU. IPv4 MTU is 576, IPv6 MTU is 1280, and most broadband routers have 1454 MTU.
Sourcefn sad(&self) -> Sadder
fn sad(&self) -> Sadder
Returns a copy of the serializable attribute dictionary (saidified data)
fn as_any(&self) -> &dyn Any
fn clone_box(&self) -> Box<dyn Serder>
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl Serder for BaseSerder
impl Serder for SerderACDC
Implement the Serder trait for SerderKERI
impl Serder for SerderKERI
Implement the Serder trait for SerderKERI