mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
rustdoc: Fix many rustdoc errors (#31147)
This fixes many rustdoc errors that occur due to raw URLs in rustdoc comments as well as unescaped Rust code that should be in backticks.
This commit is contained in:
parent
d7de206dbd
commit
5c1723c983
185 changed files with 939 additions and 942 deletions
|
@ -111,10 +111,10 @@ pub struct WebGLCreateContextResult {
|
|||
/// Defines the WebGL version
|
||||
#[derive(Clone, Copy, Debug, Deserialize, Eq, MallocSizeOf, PartialEq, PartialOrd, Serialize)]
|
||||
pub enum WebGLVersion {
|
||||
/// https://www.khronos.org/registry/webgl/specs/1.0.2/
|
||||
/// <https://www.khronos.org/registry/webgl/specs/1.0.2/>
|
||||
/// Conforms closely to the OpenGL ES 2.0 API
|
||||
WebGL1,
|
||||
/// https://www.khronos.org/registry/webgl/specs/latest/2.0/
|
||||
/// <https://www.khronos.org/registry/webgl/specs/latest/2.0/>
|
||||
/// Conforms closely to the OpenGL ES 3.0 API
|
||||
WebGL2,
|
||||
}
|
||||
|
|
|
@ -270,7 +270,7 @@ impl Debug for EmbedderMsg {
|
|||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
pub struct FilterPattern(pub String);
|
||||
|
||||
/// https://w3c.github.io/mediasession/#mediametadata
|
||||
/// <https://w3c.github.io/mediasession/#mediametadata>
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
pub struct MediaMetadata {
|
||||
/// Title
|
||||
|
@ -291,7 +291,7 @@ impl MediaMetadata {
|
|||
}
|
||||
}
|
||||
|
||||
/// https://w3c.github.io/mediasession/#enumdef-mediasessionplaybackstate
|
||||
/// <https://w3c.github.io/mediasession/#enumdef-mediasessionplaybackstate>
|
||||
#[repr(i32)]
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
pub enum MediaSessionPlaybackState {
|
||||
|
@ -303,7 +303,7 @@ pub enum MediaSessionPlaybackState {
|
|||
Paused,
|
||||
}
|
||||
|
||||
/// https://w3c.github.io/mediasession/#dictdef-mediapositionstate
|
||||
/// <https://w3c.github.io/mediasession/#dictdef-mediapositionstate>
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
pub struct MediaPositionState {
|
||||
pub duration: f64,
|
||||
|
|
|
@ -116,7 +116,7 @@ pub struct Response {
|
|||
pub internal_response: Option<Box<Response>>,
|
||||
/// whether or not to try to return the internal_response when asked for actual_response
|
||||
pub return_internal: bool,
|
||||
/// https://fetch.spec.whatwg.org/#concept-response-aborted
|
||||
/// <https://fetch.spec.whatwg.org/#concept-response-aborted>
|
||||
#[ignore_malloc_size_of = "AtomicBool heap size undefined"]
|
||||
pub aborted: Arc<AtomicBool>,
|
||||
/// track network metrics
|
||||
|
|
|
@ -288,7 +288,7 @@ pub enum UpdatePipelineIdReason {
|
|||
pub enum ConstellationControlMsg {
|
||||
/// Takes the associated window proxy out of "delaying-load-events-mode",
|
||||
/// used if a scheduled navigated was refused by the embedder.
|
||||
/// https://html.spec.whatwg.org/multipage/#delaying-load-events-mode
|
||||
/// <https://html.spec.whatwg.org/multipage/#delaying-load-events-mode>
|
||||
StopDelayingLoadEventsMode(PipelineId),
|
||||
/// Sends the final response to script thread for fetching after all redirections
|
||||
/// have been resolved
|
||||
|
@ -344,7 +344,7 @@ pub enum ConstellationControlMsg {
|
|||
/// The expected origin of the target.
|
||||
target_origin: Option<ImmutableOrigin>,
|
||||
/// The source origin of the message.
|
||||
/// https://html.spec.whatwg.org/multipage/#dom-messageevent-origin
|
||||
/// <https://html.spec.whatwg.org/multipage/#dom-messageevent-origin>
|
||||
source_origin: ImmutableOrigin,
|
||||
/// The data to be posted.
|
||||
data: StructuredSerializedData,
|
||||
|
@ -1016,7 +1016,7 @@ impl StructuredSerializedData {
|
|||
}
|
||||
}
|
||||
|
||||
/// A task on the https://html.spec.whatwg.org/multipage/#port-message-queue
|
||||
/// A task on the <https://html.spec.whatwg.org/multipage/#port-message-queue>
|
||||
#[derive(Debug, Deserialize, MallocSizeOf, Serialize)]
|
||||
pub struct PortMessageTask {
|
||||
/// The origin of this task.
|
||||
|
@ -1062,7 +1062,7 @@ impl Clone for BroadcastMsg {
|
|||
}
|
||||
|
||||
/// The type of MediaSession action.
|
||||
/// https://w3c.github.io/mediasession/#enumdef-mediasessionaction
|
||||
/// <https://w3c.github.io/mediasession/#enumdef-mediasessionaction>
|
||||
#[derive(Clone, Debug, Deserialize, Eq, Hash, MallocSizeOf, PartialEq, Serialize)]
|
||||
pub enum MediaSessionActionType {
|
||||
/// The action intent is to resume playback.
|
||||
|
|
|
@ -87,7 +87,7 @@ pub enum LogEntry {
|
|||
Warn(String),
|
||||
}
|
||||
|
||||
/// https://html.spec.whatwg.org/multipage/#replacement-enabled
|
||||
/// <https://html.spec.whatwg.org/multipage/#replacement-enabled>
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
pub enum HistoryEntryReplacement {
|
||||
/// Traverse the history with replacement enabled.
|
||||
|
@ -197,7 +197,7 @@ pub enum ScriptMsg {
|
|||
/// The expected origin of the target.
|
||||
target_origin: Option<ImmutableOrigin>,
|
||||
/// The source origin of the message.
|
||||
/// https://html.spec.whatwg.org/multipage/#dom-messageevent-origin
|
||||
/// <https://html.spec.whatwg.org/multipage/#dom-messageevent-origin>
|
||||
source_origin: ImmutableOrigin,
|
||||
/// The data to be posted.
|
||||
data: StructuredSerializedData,
|
||||
|
@ -245,7 +245,7 @@ pub enum ScriptMsg {
|
|||
/// Send messages from postMessage calls from serviceworker
|
||||
/// to constellation for storing in service worker manager
|
||||
ForwardDOMMessage(DOMMessage, ServoUrl),
|
||||
/// https://w3c.github.io/ServiceWorker/#schedule-job-algorithm.
|
||||
/// <https://w3c.github.io/ServiceWorker/#schedule-job-algorithm>
|
||||
ScheduleJob(Job),
|
||||
/// Get Window Informations size and position
|
||||
GetClientWindow(IpcSender<(DeviceIntSize, DeviceIntPoint)>),
|
||||
|
@ -375,29 +375,29 @@ pub enum ServiceWorkerMsg {
|
|||
Timeout(ServoUrl),
|
||||
/// Message sent by constellation to forward to a running service worker
|
||||
ForwardDOMMessage(DOMMessage, ServoUrl),
|
||||
/// https://w3c.github.io/ServiceWorker/#schedule-job-algorithm
|
||||
/// <https://w3c.github.io/ServiceWorker/#schedule-job-algorithm>
|
||||
ScheduleJob(Job),
|
||||
/// Exit the service worker manager
|
||||
Exit,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, PartialEq, Serialize)]
|
||||
/// https://w3c.github.io/ServiceWorker/#dfn-job-type
|
||||
/// <https://w3c.github.io/ServiceWorker/#dfn-job-type>
|
||||
pub enum JobType {
|
||||
/// <https://w3c.github.io/ServiceWorker/#register>
|
||||
Register,
|
||||
/// <https://w3c.github.io/ServiceWorker/#unregister-algorithm>
|
||||
Unregister,
|
||||
/// <https://w3c.github.io/ServiceWorker/#update-algorithm
|
||||
/// <https://w3c.github.io/ServiceWorker/#update-algorithm>
|
||||
Update,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
/// The kind of error the job promise should be rejected with.
|
||||
pub enum JobError {
|
||||
/// https://w3c.github.io/ServiceWorker/#reject-job-promise
|
||||
/// <https://w3c.github.io/ServiceWorker/#reject-job-promise>
|
||||
TypeError,
|
||||
/// https://w3c.github.io/ServiceWorker/#reject-job-promise
|
||||
/// <https://w3c.github.io/ServiceWorker/#reject-job-promise>
|
||||
SecurityError,
|
||||
}
|
||||
|
||||
|
@ -405,9 +405,9 @@ pub enum JobError {
|
|||
/// Messages sent from Job algorithms steps running in the SW manager,
|
||||
/// in order to resolve or reject the job promise.
|
||||
pub enum JobResult {
|
||||
/// https://w3c.github.io/ServiceWorker/#reject-job-promise
|
||||
/// <https://w3c.github.io/ServiceWorker/#reject-job-promise>
|
||||
RejectPromise(JobError),
|
||||
/// https://w3c.github.io/ServiceWorker/#resolve-job-promise
|
||||
/// <https://w3c.github.io/ServiceWorker/#resolve-job-promise>
|
||||
ResolvePromise(Job, JobResultValue),
|
||||
}
|
||||
|
||||
|
@ -428,7 +428,7 @@ pub enum JobResultValue {
|
|||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
/// https://w3c.github.io/ServiceWorker/#dfn-job
|
||||
/// <https://w3c.github.io/ServiceWorker/#dfn-job>
|
||||
pub struct Job {
|
||||
/// <https://w3c.github.io/ServiceWorker/#dfn-job-type>
|
||||
pub job_type: JobType,
|
||||
|
@ -445,7 +445,7 @@ pub struct Job {
|
|||
}
|
||||
|
||||
impl Job {
|
||||
/// https://w3c.github.io/ServiceWorker/#create-job-algorithm
|
||||
/// <https://w3c.github.io/ServiceWorker/#create-job-algorithm>
|
||||
pub fn create_job(
|
||||
job_type: JobType,
|
||||
scope_url: ServoUrl,
|
||||
|
@ -466,7 +466,7 @@ impl Job {
|
|||
}
|
||||
|
||||
impl PartialEq for Job {
|
||||
/// Equality criteria as described in https://w3c.github.io/ServiceWorker/#dfn-job-equivalent
|
||||
/// Equality criteria as described in <https://w3c.github.io/ServiceWorker/#dfn-job-equivalent>
|
||||
fn eq(&self, other: &Self) -> bool {
|
||||
// TODO: match on job type, take worker type and `update_via_cache_mode` into account.
|
||||
let same_job = self.job_type == other.job_type;
|
||||
|
@ -488,6 +488,6 @@ impl PartialEq for Job {
|
|||
pub enum SWManagerMsg {
|
||||
/// Placeholder to keep the enum,
|
||||
/// as it will be needed when implementing
|
||||
/// https://github.com/servo/servo/issues/24660
|
||||
/// <https://github.com/servo/servo/issues/24660>
|
||||
PostMessageToClient,
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
//! This module contains implementations in script that are serializable,
|
||||
//! as per https://html.spec.whatwg.org/multipage/#serializable-objects.
|
||||
//! as per <https://html.spec.whatwg.org/multipage/#serializable-objects>.
|
||||
//! The implementations are here instead of in script
|
||||
//! so that the other modules involved in the serialization don't have
|
||||
//! to depend on script.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue