Skip to main content

HopperRefOnly

Trait HopperRefOnly 

Source
pub trait HopperRefOnly: Sealed { }
Expand description

Marker trait implemented exclusively by Hopper’s four account-data borrow guards: Ref, RefMut, SegRef, SegRefMut.

Use this as a bound on APIs that must accept only drop-guarded borrows. A naked &T or &mut T will fail the bound at compile time, which is the closure proof for Finding 2 of the audit (“borrow safety compile-proven, not just runtime-enforced”).

Implementors§

Source§

impl<T: ?Sized> HopperRefOnly for Ref<'_, T>

Source§

impl<T: ?Sized> HopperRefOnly for RefMut<'_, T>

Source§

impl<T: ?Sized> HopperRefOnly for SegRef<'_, T>

Source§

impl<T: ?Sized> HopperRefOnly for SegRefMut<'_, T>