mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-09-12 04:32:58 +02:00
renames for core pdu
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
e507c31306
commit
79c6b51860
12 changed files with 123 additions and 89 deletions
|
@ -4,13 +4,13 @@ use serde_json::value::Value as JsonValue;
|
|||
use crate::{err, implement, Result};
|
||||
|
||||
#[must_use]
|
||||
#[implement(super::PduEvent)]
|
||||
#[implement(super::Pdu)]
|
||||
pub fn get_content_as_value(&self) -> JsonValue {
|
||||
self.get_content()
|
||||
.expect("pdu content must be a valid JSON value")
|
||||
}
|
||||
|
||||
#[implement(super::PduEvent)]
|
||||
#[implement(super::Pdu)]
|
||||
pub fn get_content<T>(&self) -> Result<T>
|
||||
where
|
||||
T: for<'de> Deserialize<'de>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue