Struct shadow_rs::host::descriptor::CountedLegacyFileRef
source · pub struct CountedLegacyFileRef(/* private fields */);
Expand description
Represents a counted reference to a legacy file object. Will decrement the legacy file’s ref count when dropped.
Implementations§
source§impl CountedLegacyFileRef
impl CountedLegacyFileRef
sourcepub fn new(ptr: HostTreePointer<LegacyFile>) -> Self
pub fn new(ptr: HostTreePointer<LegacyFile>) -> Self
Does not increment the legacy file’s ref count, but will decrement the ref count when dropped.
sourcepub unsafe fn ptr(&self) -> *mut LegacyFile
pub unsafe fn ptr(&self) -> *mut LegacyFile
§Safety
See HostTreePointer::ptr
.
Trait Implementations§
source§impl Clone for CountedLegacyFileRef
impl Clone for CountedLegacyFileRef
source§impl Debug for CountedLegacyFileRef
impl Debug for CountedLegacyFileRef
Auto Trait Implementations§
impl Freeze for CountedLegacyFileRef
impl RefUnwindSafe for CountedLegacyFileRef
impl Send for CountedLegacyFileRef
impl Sync for CountedLegacyFileRef
impl Unpin for CountedLegacyFileRef
impl UnwindSafe for CountedLegacyFileRef
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more