pub struct SourceTag(/* private fields */);Expand description
A static C-string tag identifying the source location ("file:line") where a lock is acquired.
Used with RawMonitoredSpinlock to pass critical section names to the kernel lockup detector.
Construct via the source_tag! macro, which is the Rust equivalent of C++ SOURCE_TAG.
Implementations§
Source§impl SourceTag
impl SourceTag
Sourcepub const unsafe fn from_bytes_with_nul_unchecked(bytes: &'static [u8]) -> Self
pub const unsafe fn from_bytes_with_nul_unchecked(bytes: &'static [u8]) -> Self
Creates a SourceTag from a static null-terminated byte slice without checking for
interior null bytes.
§Safety
bytes must be a valid null-terminated C string (ending in \0 with no interior \0
bytes).
Trait Implementations§
impl Copy for SourceTag
impl Eq for SourceTag
impl StructuralPartialEq for SourceTag
Auto Trait Implementations§
impl Freeze for SourceTag
impl RefUnwindSafe for SourceTag
impl Send for SourceTag
impl Sync for SourceTag
impl Unpin for SourceTag
impl UnsafeUnpin for SourceTag
impl UnwindSafe for SourceTag
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere
U: From<T>,
Source§impl<T> PinInit<T> for T
impl<T> PinInit<T> for T
Source§unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), !>
unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), !>
Initializes
slot. Read moreSource§fn pin_chain<F>(self, f: F) -> ChainPinInit<Self, F, T, E>where
F: FnOnce(Pin<&mut T>) -> Result<(), E>,
fn pin_chain<F>(self, f: F) -> ChainPinInit<Self, F, T, E>where
F: FnOnce(Pin<&mut T>) -> Result<(), E>,
First initializes the value using
self then calls the function f with the initialized
value. Read more