RwReadGuard
Owns shared readonly lock access and retained payload lifetime. Cannot copy, cross await or transfer threads. Move transfers only within the acquiring thread; moved guards are inert. Cleanup unlocks before releasing payload storage. Every returned reference expires at unlock/move/destruction.
Module std.sync
import std.sync;Public declaration contracts and authored examples. A page can document several related symbols. Implementation bodies are excluded.
RwReadGuard
pub final class RwReadGuard<T> where T: MovableOwns shared readonly lock access and retained payload lifetime. Cannot copy, cross await or transfer threads. Move transfers only within the acquiring thread; moved guards are inert. Cleanup unlocks before releasing payload storage. Every returned reference expires at unlock/move/destruction. T: Movable protected payload.
RwReadGuard.init
pub init(Source: readonly Self&) = delete;Rejects duplicate unlock authority. Source: Existing guard.
RwReadGuard.init
pub init(Source: mut Self&&)Transfers unlock authority within the same thread. Source: Guard left inert.
RwReadGuard.operator
pub fn operator =(Source: readonly Self&) -> void = delete;Rejects copying unlock authority. Source: Existing guard. Return: No runtime result; this assignment is deleted and cannot be invoked.
RwReadGuard.operator
pub fn operator =(Source: mut Self&&) -> void = delete;Rejects replacement of an active guard; use a new scoped guard instead. Source: Transfer source. Return: No runtime result; this assignment is deleted and cannot be invoked.
RwReadGuard.IsEmpty
pub IsEmpty: bool;Observes moved/inert guard state.
RwReadGuard.Value
pub readonly fn Value() -> readonly T&Borrows protected payload readonly until this guard is moved/unlocked/destroyed. Return: Readonly reference; moved guard access traps.