events: Make docs for Thread constructors a bit more comprehensible
This commit is contained in:
parent
a3f8c97b33
commit
2708baeed8
@ -107,14 +107,14 @@ pub struct Thread {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Thread {
|
impl Thread {
|
||||||
/// Convenience method to create a regular `Thread` with the given event ID and latest
|
/// Convenience method to create a regular `Thread` relation with the given root event ID and
|
||||||
/// message-like event ID.
|
/// latest message-like event ID.
|
||||||
pub fn plain(event_id: OwnedEventId, latest_event_id: OwnedEventId) -> Self {
|
pub fn plain(event_id: OwnedEventId, latest_event_id: OwnedEventId) -> Self {
|
||||||
Self { event_id, in_reply_to: Some(InReplyTo::new(latest_event_id)), is_falling_back: true }
|
Self { event_id, in_reply_to: Some(InReplyTo::new(latest_event_id)), is_falling_back: true }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Convenience method to create a reply `Thread` with the given event ID and replied-to event
|
/// Convenience method to create a reply `Thread` relation with the given root event ID and
|
||||||
/// ID.
|
/// replied-to event ID.
|
||||||
pub fn reply(event_id: OwnedEventId, reply_to_event_id: OwnedEventId) -> Self {
|
pub fn reply(event_id: OwnedEventId, reply_to_event_id: OwnedEventId) -> Self {
|
||||||
Self {
|
Self {
|
||||||
event_id,
|
event_id,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user