Minor comment spelling and formatting fixes
This commit is contained in:
parent
acf865092d
commit
85037832d1
@ -67,7 +67,7 @@ use http::Method;
|
|||||||
/// * `name`: A unique name for the endpoint. Generally this will be the same as the containing
|
/// * `name`: A unique name for the endpoint. Generally this will be the same as the containing
|
||||||
/// module.
|
/// module.
|
||||||
/// * `path`: The path component of the URL for the endpoint, e.g. "/foo/bar". Components of
|
/// * `path`: The path component of the URL for the endpoint, e.g. "/foo/bar". Components of
|
||||||
/// the path that are parameterized can indicate a varible by using a Rust identifier
|
/// the path that are parameterized can indicate a variable by using a Rust identifier
|
||||||
/// prefixed with a colon, e.g. `/foo/:some_parameter`. A corresponding query string
|
/// prefixed with a colon, e.g. `/foo/:some_parameter`. A corresponding query string
|
||||||
/// parameter will be expected in the request struct (see below for details).
|
/// parameter will be expected in the request struct (see below for details).
|
||||||
/// * `rate_limited`: Whether or not the endpoint enforces rate limiting on requests.
|
/// * `rate_limited`: Whether or not the endpoint enforces rate limiting on requests.
|
||||||
|
@ -26,7 +26,7 @@ pub struct AnswerEventContent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl AnswerEventContent {
|
impl AnswerEventContent {
|
||||||
/// Creates an `AnswerEventContent` with the gieven answer, call ID and VoIP version.
|
/// Creates an `AnswerEventContent` with the given answer, call ID and VoIP version.
|
||||||
pub fn new(answer: SessionDescription, call_id: String, version: UInt) -> Self {
|
pub fn new(answer: SessionDescription, call_id: String, version: UInt) -> Self {
|
||||||
Self { answer, call_id, version }
|
Self { answer, call_id, version }
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ pub type InviteEvent = MessageEvent<InviteEventContent>;
|
|||||||
#[derive(Clone, Debug, Deserialize, Serialize, MessageEventContent)]
|
#[derive(Clone, Debug, Deserialize, Serialize, MessageEventContent)]
|
||||||
#[ruma_event(type = "m.call.invite")]
|
#[ruma_event(type = "m.call.invite")]
|
||||||
pub struct InviteEventContent {
|
pub struct InviteEventContent {
|
||||||
/// A unique identifer for the call.
|
/// A unique identifier for the call.
|
||||||
pub call_id: String,
|
pub call_id: String,
|
||||||
|
|
||||||
/// The time in milliseconds that the invite is valid for. Once the invite age exceeds this
|
/// The time in milliseconds that the invite is valid for. Once the invite age exceeds this
|
||||||
|
@ -162,7 +162,7 @@
|
|||||||
//! The collection types are enums which effectively "wrap" each possible event type of a
|
//! The collection types are enums which effectively "wrap" each possible event type of a
|
||||||
//! particular event "kind."
|
//! particular event "kind."
|
||||||
//!
|
//!
|
||||||
//! Because of the hierarchical nature of event kinds in Matrix, these collection types are divied
|
//! Because of the hierarchical nature of event kinds in Matrix, these collection types are divided
|
||||||
//! into two modules, `ruma_events::collections::all` and `ruma_events::collections::only`.
|
//! into two modules, `ruma_events::collections::all` and `ruma_events::collections::only`.
|
||||||
//! The "all" versions include every event type that implements the relevant event trait as well as
|
//! The "all" versions include every event type that implements the relevant event trait as well as
|
||||||
//! more specific event traits.
|
//! more specific event traits.
|
||||||
@ -497,7 +497,7 @@ pub struct UnsignedDeHelper {
|
|||||||
pub redacted_because: Option<IgnoredAny>,
|
pub redacted_because: Option<IgnoredAny>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Helper struct to determine the event kind from a serde_json::value::RawValue.
|
/// Helper struct to determine the event kind from a `serde_json::value::RawValue`.
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
#[derive(Debug, Deserialize)]
|
#[derive(Debug, Deserialize)]
|
||||||
pub struct EventDeHelper {
|
pub struct EventDeHelper {
|
||||||
@ -516,12 +516,12 @@ pub struct EventDeHelper {
|
|||||||
/// the event will be deserialized as a ephemeral event.
|
/// the event will be deserialized as a ephemeral event.
|
||||||
pub room_id: Option<IgnoredAny>,
|
pub room_id: Option<IgnoredAny>,
|
||||||
|
|
||||||
/// If this `UnsignedData` contains a redacted_because key the event is
|
/// If this `UnsignedData` contains a `redacted_because` key the event is
|
||||||
/// immediately deserialized as a redacted event.
|
/// immediately deserialized as a redacted event.
|
||||||
pub unsigned: Option<UnsignedDeHelper>,
|
pub unsigned: Option<UnsignedDeHelper>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Helper function for serde_json::value::RawValue deserialization.
|
/// Helper function for `serde_json::value::RawValue` deserialization.
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
pub fn from_raw_json_value<T, E>(val: &RawJsonValue) -> Result<T, E>
|
pub fn from_raw_json_value<T, E>(val: &RawJsonValue) -> Result<T, E>
|
||||||
where
|
where
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
//! A presence event is represented by a struct with a set content field.
|
//! A presence event is represented by a struct with a set content field.
|
||||||
//!
|
//!
|
||||||
//! The only content valid for this event is `PresenceEventContent.
|
//! The only content valid for this event is `PresenceEventContent`.
|
||||||
|
|
||||||
use js_int::UInt;
|
use js_int::UInt;
|
||||||
use ruma_common::presence::PresenceState;
|
use ruma_common::presence::PresenceState;
|
||||||
|
@ -121,7 +121,7 @@ pub struct JsonWebKey {
|
|||||||
/// Required. Algorithm. Must be `A256CTR`.
|
/// Required. Algorithm. Must be `A256CTR`.
|
||||||
pub alg: String,
|
pub alg: String,
|
||||||
|
|
||||||
/// The key, encoded as urlsafe unpadded base64.
|
/// The key, encoded as url-safe unpadded base64.
|
||||||
pub k: String,
|
pub k: String,
|
||||||
|
|
||||||
/// Extractable. Must be `true`. This is a
|
/// Extractable. Must be `true`. This is a
|
||||||
|
@ -149,7 +149,7 @@ fn default_power_level() -> Int {
|
|||||||
Int::from(50)
|
Int::from(50)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Used with #[serde(skip_serializing_if)] to omit default power levels.
|
/// Used with `#[serde(skip_serializing_if)]` to omit default power levels.
|
||||||
#[allow(clippy::trivially_copy_pass_by_ref)]
|
#[allow(clippy::trivially_copy_pass_by_ref)]
|
||||||
fn is_default_power_level(l: &Int) -> bool {
|
fn is_default_power_level(l: &Int) -> bool {
|
||||||
*l == Int::from(50)
|
*l == Int::from(50)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user