refactor: Rename PduBuilder to PartialPdu

This commit is contained in:
Ginger
2026-04-10 11:47:01 -04:00
parent bf9c9716eb
commit 97a01a1500
27 changed files with 95 additions and 95 deletions
@@ -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(),