Update formatting of lib.rs
This commit is contained in:
parent
eaf26fdb0b
commit
013decf401
15
src/lib.rs
15
src/lib.rs
@ -430,10 +430,12 @@ mod custom {
|
||||
impl Event for CustomEvent {
|
||||
/// The type of this event's `content` field.
|
||||
type Content = CustomEventContent;
|
||||
|
||||
/// The event's content.
|
||||
fn content(&self) -> &Self::Content {
|
||||
&self.content
|
||||
}
|
||||
|
||||
/// The type of the event.
|
||||
fn event_type(&self) -> EventType {
|
||||
EventType::Custom(self.event_type.clone())
|
||||
@ -493,10 +495,12 @@ mod custom_room {
|
||||
impl Event for CustomRoomEvent {
|
||||
/// The type of this event's `content` field.
|
||||
type Content = CustomRoomEventContent;
|
||||
|
||||
/// The event's content.
|
||||
fn content(&self) -> &Self::Content {
|
||||
&self.content
|
||||
}
|
||||
|
||||
/// The type of the event.
|
||||
fn event_type(&self) -> EventType {
|
||||
EventType::Custom(self.event_type.clone())
|
||||
@ -508,10 +512,12 @@ mod custom_room {
|
||||
fn event_id(&self) -> &ruma_identifiers::EventId {
|
||||
&self.event_id
|
||||
}
|
||||
|
||||
/// Time on originating homeserver when this event was sent.
|
||||
fn origin_server_ts(&self) -> SystemTime {
|
||||
self.origin_server_ts
|
||||
}
|
||||
|
||||
/// The unique identifier for the room associated with this event.
|
||||
///
|
||||
/// This can be `None` if the event came from a context where there is
|
||||
@ -519,10 +525,12 @@ mod custom_room {
|
||||
fn room_id(&self) -> Option<&ruma_identifiers::RoomId> {
|
||||
self.room_id.as_ref()
|
||||
}
|
||||
|
||||
/// The unique identifier for the user who sent this event.
|
||||
fn sender(&self) -> &ruma_identifiers::UserId {
|
||||
&self.sender
|
||||
}
|
||||
|
||||
/// Additional key-value pairs not signed by the homeserver.
|
||||
fn unsigned(&self) -> &Map<String, Value> {
|
||||
&self.unsigned
|
||||
@ -597,10 +605,12 @@ mod custom_state {
|
||||
impl Event for CustomStateEvent {
|
||||
/// The type of this event's `content` field.
|
||||
type Content = CustomStateEventContent;
|
||||
|
||||
/// The event's content.
|
||||
fn content(&self) -> &Self::Content {
|
||||
&self.content
|
||||
}
|
||||
|
||||
/// The type of the event.
|
||||
fn event_type(&self) -> EventType {
|
||||
EventType::Custom(self.event_type.clone())
|
||||
@ -612,10 +622,12 @@ mod custom_state {
|
||||
fn event_id(&self) -> &ruma_identifiers::EventId {
|
||||
&self.event_id
|
||||
}
|
||||
|
||||
/// Time on originating homeserver when this event was sent.
|
||||
fn origin_server_ts(&self) -> SystemTime {
|
||||
self.origin_server_ts
|
||||
}
|
||||
|
||||
/// The unique identifier for the room associated with this event.
|
||||
///
|
||||
/// This can be `None` if the event came from a context where there is
|
||||
@ -623,10 +635,12 @@ mod custom_state {
|
||||
fn room_id(&self) -> Option<&ruma_identifiers::RoomId> {
|
||||
self.room_id.as_ref()
|
||||
}
|
||||
|
||||
/// The unique identifier for the user who sent this event.
|
||||
fn sender(&self) -> &ruma_identifiers::UserId {
|
||||
&self.sender
|
||||
}
|
||||
|
||||
/// Additional key-value pairs not signed by the homeserver.
|
||||
fn unsigned(&self) -> &Map<String, Value> {
|
||||
&self.unsigned
|
||||
@ -638,6 +652,7 @@ mod custom_state {
|
||||
fn prev_content(&self) -> Option<&Self::Content> {
|
||||
self.prev_content.as_ref()
|
||||
}
|
||||
|
||||
/// A key that determines which piece of room state the event represents.
|
||||
fn state_key(&self) -> &str {
|
||||
&self.state_key
|
||||
|
Loading…
x
Reference in New Issue
Block a user