pub struct StLock<T> { /* private fields */ }Expand description
Shared interior of FcFontCache. Always accessed through an
Arc — never referenced directly by external callers.
Implementations§
Source§impl<T> StLock<T>
impl<T> StLock<T>
pub fn new(v: T) -> Self
pub fn read(&self) -> Result<StReadGuard<'_, T>, Infallible>
pub fn write(&self) -> Result<StWriteGuard<'_, T>, Infallible>
pub fn lock(&self) -> Result<StWriteGuard<'_, T>, Infallible>
Trait Implementations§
Auto Trait Implementations§
impl<T> !Freeze for StLock<T>
impl<T> RefUnwindSafe for StLock<T>
impl<T> Send for StLock<T>where
T: Send,
impl<T> Sync for StLock<T>
impl<T> Unpin for StLock<T>where
T: Unpin,
impl<T> UnsafeUnpin for StLock<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for StLock<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more