Use recently stabilized intra-doc links
See RFC: https://github.com/rust-lang/rfcs/blob/master/text/1946-intra-rustdoc-links.md
This commit is contained in:
parent
d612bf5678
commit
01322f69a4
135 changed files with 135 additions and 1769 deletions
|
|
@ -5,8 +5,6 @@ use crate::{
|
|||
|
||||
/// The execution state of a [`Program`]. It leverages caching, event
|
||||
/// processing, and rendering primitive storage.
|
||||
///
|
||||
/// [`Program`]: trait.Program.html
|
||||
#[allow(missing_debug_implementations)]
|
||||
pub struct State<P>
|
||||
where
|
||||
|
|
@ -25,9 +23,6 @@ where
|
|||
{
|
||||
/// Creates a new [`State`] with the provided [`Program`], initializing its
|
||||
/// primitive with the given logical bounds and renderer.
|
||||
///
|
||||
/// [`State`]: struct.State.html
|
||||
/// [`Program`]: trait.Program.html
|
||||
pub fn new(
|
||||
mut program: P,
|
||||
bounds: Size,
|
||||
|
|
@ -59,39 +54,30 @@ where
|
|||
}
|
||||
|
||||
/// Returns a reference to the [`Program`] of the [`State`].
|
||||
///
|
||||
/// [`Program`]: trait.Program.html
|
||||
/// [`State`]: struct.State.html
|
||||
pub fn program(&self) -> &P {
|
||||
&self.program
|
||||
}
|
||||
|
||||
/// Returns a reference to the current rendering primitive of the [`State`].
|
||||
///
|
||||
/// [`State`]: struct.State.html
|
||||
pub fn primitive(&self) -> &<P::Renderer as Renderer>::Output {
|
||||
&self.primitive
|
||||
}
|
||||
|
||||
/// Queues an event in the [`State`] for processing during an [`update`].
|
||||
///
|
||||
/// [`State`]: struct.State.html
|
||||
/// [`update`]: #method.update
|
||||
/// [`update`]: Self::update
|
||||
pub fn queue_event(&mut self, event: Event) {
|
||||
self.queued_events.push(event);
|
||||
}
|
||||
|
||||
/// Queues a message in the [`State`] for processing during an [`update`].
|
||||
///
|
||||
/// [`State`]: struct.State.html
|
||||
/// [`update`]: #method.update
|
||||
/// [`update`]: Self::update
|
||||
pub fn queue_message(&mut self, message: P::Message) {
|
||||
self.queued_messages.push(message);
|
||||
}
|
||||
|
||||
/// Returns whether the event queue of the [`State`] is empty or not.
|
||||
///
|
||||
/// [`State`]: struct.State.html
|
||||
pub fn is_queue_empty(&self) -> bool {
|
||||
self.queued_events.is_empty() && self.queued_messages.is_empty()
|
||||
}
|
||||
|
|
@ -101,8 +87,6 @@ where
|
|||
///
|
||||
/// Returns the [`Command`] obtained from [`Program`] after updating it,
|
||||
/// only if an update was necessary.
|
||||
///
|
||||
/// [`Program`]: trait.Program.html
|
||||
pub fn update(
|
||||
&mut self,
|
||||
bounds: Size,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue