Lines Matching refs:G
60 pub struct RawReentrantMutex<R, G> {
64 get_thread_id: G,
67 unsafe impl<R: RawMutex + Send, G: GetThreadId + Send> Send for RawReentrantMutex<R, G> {}
68 unsafe impl<R: RawMutex + Sync, G: GetThreadId + Sync> Sync for RawReentrantMutex<R, G> {}
70 impl<R: RawMutex, G: GetThreadId> RawReentrantMutex<R, G> {
77 get_thread_id: G::INIT,
140 impl<R: RawMutexFair, G: GetThreadId> RawReentrantMutex<R, G> {
178 impl<R: RawMutexTimed, G: GetThreadId> RawReentrantMutex<R, G> {
203 pub struct ReentrantMutex<R, G, T: ?Sized> {
204 raw: RawReentrantMutex<R, G>,
208 unsafe impl<R: RawMutex + Send, G: GetThreadId + Send, T: ?Sized + Send> Send
209 for ReentrantMutex<R, G, T>
212 unsafe impl<R: RawMutex + Sync, G: GetThreadId + Sync, T: ?Sized + Send> Sync
213 for ReentrantMutex<R, G, T>
217 impl<R: RawMutex, G: GetThreadId, T> ReentrantMutex<R, G, T> {
221 pub const fn new(val: T) -> ReentrantMutex<R, G, T> { in new() argument
228 get_thread_id: G::INIT, in new()
236 pub fn new(val: T) -> ReentrantMutex<R, G, T> { in new() argument
243 get_thread_id: G::INIT, in new()
255 impl<R, G, T> ReentrantMutex<R, G, T> {
262 pub const fn const_new(raw_mutex: R, get_thread_id: G, val: T) -> ReentrantMutex<R, G, T> { in const_new() argument
275 impl<R: RawMutex, G: GetThreadId, T: ?Sized> ReentrantMutex<R, G, T> {
280 unsafe fn guard(&self) -> ReentrantMutexGuard<'_, R, G, T> { in guard() argument
298 pub fn lock(&self) -> ReentrantMutexGuard<'_, R, G, T> { in lock() argument
312 pub fn try_lock(&self) -> Option<ReentrantMutexGuard<'_, R, G, T>> { in try_lock() argument
384 impl<R: RawMutexFair, G: GetThreadId, T: ?Sized> ReentrantMutex<R, G, T> {
402 impl<R: RawMutexTimed, G: GetThreadId, T: ?Sized> ReentrantMutex<R, G, T> {
409 pub fn try_lock_for(&self, timeout: R::Duration) -> Option<ReentrantMutexGuard<'_, R, G, T>> { in try_lock_for() argument
424 pub fn try_lock_until(&self, timeout: R::Instant) -> Option<ReentrantMutexGuard<'_, R, G, T>> { in try_lock_until() argument
434 impl<R: RawMutex, G: GetThreadId, T: ?Sized + Default> Default for ReentrantMutex<R, G, T> {
436 fn default() -> ReentrantMutex<R, G, T> { in default()
441 impl<R: RawMutex, G: GetThreadId, T> From<T> for ReentrantMutex<R, G, T> {
443 fn from(t: T) -> ReentrantMutex<R, G, T> { in from() argument
448 impl<R: RawMutex, G: GetThreadId, T: ?Sized + fmt::Debug> fmt::Debug for ReentrantMutex<R, G, T> {
473 impl<R, G, T> Serialize for ReentrantMutex<R, G, T>
476 G: GetThreadId,
488 impl<'de, R, G, T> Deserialize<'de> for ReentrantMutex<R, G, T>
491 G: GetThreadId,
508 pub struct ReentrantMutexGuard<'a, R: RawMutex, G: GetThreadId, T: ?Sized> {
509 remutex: &'a ReentrantMutex<R, G, T>,
513 unsafe impl<'a, R: RawMutex + Sync + 'a, G: GetThreadId + Sync + 'a, T: ?Sized + Sync + 'a> Sync
514 for ReentrantMutexGuard<'a, R, G, T>
518 impl<'a, R: RawMutex + 'a, G: GetThreadId + 'a, T: ?Sized + 'a> ReentrantMutexGuard<'a, R, G, T> {
520 pub fn remutex(s: &Self) -> &'a ReentrantMutex<R, G, T> { in remutex() argument
533 pub fn map<U: ?Sized, F>(s: Self, f: F) -> MappedReentrantMutexGuard<'a, R, G, U> in map() argument
560 ) -> Result<MappedReentrantMutexGuard<'a, R, G, U>, Self> in try_map() argument
595 impl<'a, R: RawMutexFair + 'a, G: GetThreadId + 'a, T: ?Sized + 'a>
596 ReentrantMutexGuard<'a, R, G, T>
652 impl<'a, R: RawMutex + 'a, G: GetThreadId + 'a, T: ?Sized + 'a> Deref
653 for ReentrantMutexGuard<'a, R, G, T>
662 impl<'a, R: RawMutex + 'a, G: GetThreadId + 'a, T: ?Sized + 'a> Drop
663 for ReentrantMutexGuard<'a, R, G, T>
674 impl<'a, R: RawMutex + 'a, G: GetThreadId + 'a, T: fmt::Debug + ?Sized + 'a> fmt::Debug
675 for ReentrantMutexGuard<'a, R, G, T>
682 impl<'a, R: RawMutex + 'a, G: GetThreadId + 'a, T: fmt::Display + ?Sized + 'a> fmt::Display
683 for ReentrantMutexGuard<'a, R, G, T>
691 unsafe impl<'a, R: RawMutex + 'a, G: GetThreadId + 'a, T: ?Sized + 'a> StableAddress
692 for ReentrantMutexGuard<'a, R, G, T>
704 pub struct MappedReentrantMutexGuard<'a, R: RawMutex, G: GetThreadId, T: ?Sized> {
705 raw: &'a RawReentrantMutex<R, G>,
710 unsafe impl<'a, R: RawMutex + Sync + 'a, G: GetThreadId + Sync + 'a, T: ?Sized + Sync + 'a> Sync
711 for MappedReentrantMutexGuard<'a, R, G, T>
715 impl<'a, R: RawMutex + 'a, G: GetThreadId + 'a, T: ?Sized + 'a>
716 MappedReentrantMutexGuard<'a, R, G, T>
727 pub fn map<U: ?Sized, F>(s: Self, f: F) -> MappedReentrantMutexGuard<'a, R, G, U> in map() argument
754 ) -> Result<MappedReentrantMutexGuard<'a, R, G, U>, Self> in try_map() argument
772 impl<'a, R: RawMutexFair + 'a, G: GetThreadId + 'a, T: ?Sized + 'a>
773 MappedReentrantMutexGuard<'a, R, G, T>
797 impl<'a, R: RawMutex + 'a, G: GetThreadId + 'a, T: ?Sized + 'a> Deref
798 for MappedReentrantMutexGuard<'a, R, G, T>
807 impl<'a, R: RawMutex + 'a, G: GetThreadId + 'a, T: ?Sized + 'a> Drop
808 for MappedReentrantMutexGuard<'a, R, G, T>
819 impl<'a, R: RawMutex + 'a, G: GetThreadId + 'a, T: fmt::Debug + ?Sized + 'a> fmt::Debug
820 for MappedReentrantMutexGuard<'a, R, G, T>
827 impl<'a, R: RawMutex + 'a, G: GetThreadId + 'a, T: fmt::Display + ?Sized + 'a> fmt::Display
828 for MappedReentrantMutexGuard<'a, R, G, T>
836 unsafe impl<'a, R: RawMutex + 'a, G: GetThreadId + 'a, T: ?Sized + 'a> StableAddress
837 for MappedReentrantMutexGuard<'a, R, G, T>