pub enum RcPolicy {
Standard,
Deferred,
AggressiveElision,
Disabled,
}Expand description
Policy for how reference counting behaves.
Variants§
Standard
Standard reference counting (increment on share, decrement on drop).
Deferred
Deferred reference counting (batch decrements at scope boundaries).
AggressiveElision
Aggressive elision (skip RC for provably linear values).
Disabled
No reference counting (for debugging, everything leaks).
Implementations§
Source§impl RcPolicy
impl RcPolicy
Sourcepub fn is_deferred(&self) -> bool
pub fn is_deferred(&self) -> bool
Check if this policy uses deferred decrements.
Sourcepub fn allows_elision(&self) -> bool
pub fn allows_elision(&self) -> bool
Check if this policy allows elision.
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Check if RC is enabled.
Trait Implementations§
impl Eq for RcPolicy
impl StructuralPartialEq for RcPolicy
Auto Trait Implementations§
impl Freeze for RcPolicy
impl RefUnwindSafe for RcPolicy
impl Send for RcPolicy
impl Sync for RcPolicy
impl Unpin for RcPolicy
impl UnsafeUnpin for RcPolicy
impl UnwindSafe for RcPolicy
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