mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
refactor: Rename PduBuilder to PartialPdu
This commit is contained in:
@@ -9,9 +9,9 @@ use serde_json::value::{RawValue as RawJsonValue, to_raw_value};
|
||||
|
||||
use super::StateKey;
|
||||
|
||||
/// Build the start of a PDU in order to add it to the Database.
|
||||
/// An event and its associated metadata, without an ID, signatures, or hashes.
|
||||
#[derive(Debug, Deserialize)]
|
||||
pub struct Builder {
|
||||
pub struct PartialPdu {
|
||||
#[serde(rename = "type")]
|
||||
pub event_type: TimelineEventType,
|
||||
|
||||
@@ -30,7 +30,7 @@ pub struct Builder {
|
||||
|
||||
type Unsigned = BTreeMap<String, serde_json::Value>;
|
||||
|
||||
impl Builder {
|
||||
impl PartialPdu {
|
||||
pub fn state<S, T>(state_key: S, content: &T) -> Self
|
||||
where
|
||||
T: StateEventContent,
|
||||
@@ -58,7 +58,7 @@ impl Builder {
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for Builder {
|
||||
impl Default for PartialPdu {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
event_type: "m.room.message".into(),
|
||||
Reference in New Issue
Block a user