Struct rerun::external::re_query::RangeComponentResults
source · pub struct RangeComponentResults { /* private fields */ }
Expand description
Lazily cached results for a particular component when using a cached range query.
Implementations§
source§impl RangeComponentResults
impl RangeComponentResults
pub fn empty() -> &'static RangeComponentResults
source§impl RangeComponentResults
impl RangeComponentResults
sourcepub fn to_dense<C>(&self, resolver: &PromiseResolver) -> RangeData<'_, C>where
C: Component,
pub fn to_dense<C>(&self, resolver: &PromiseResolver) -> RangeData<'_, C>where
C: Component,
Returns the component data as a dense vector.
Returns an error if the component is missing or cannot be deserialized.
Use PromiseResult::flatten
to merge the results of resolving the promise and of
deserializing the data into a single one, if you don’t need the extra flexibility.
Methods from Deref<Target = RwLock<RawRwLock, RangeComponentResultsInner>>§
sourcepub unsafe fn make_read_guard_unchecked(&self) -> RwLockReadGuard<'_, R, T>
pub unsafe fn make_read_guard_unchecked(&self) -> RwLockReadGuard<'_, R, T>
Creates a new RwLockReadGuard
without checking if the lock is held.
§Safety
This method must only be called if the thread logically holds a read lock.
This function does not increment the read count of the lock. Calling this function when a
guard has already been produced is undefined behaviour unless the guard was forgotten
with mem::forget
.`
sourcepub unsafe fn make_write_guard_unchecked(&self) -> RwLockWriteGuard<'_, R, T>
pub unsafe fn make_write_guard_unchecked(&self) -> RwLockWriteGuard<'_, R, T>
Creates a new RwLockReadGuard
without checking if the lock is held.
§Safety
This method must only be called if the thread logically holds a write lock.
Calling this function when a guard has already been produced is undefined behaviour unless
the guard was forgotten with mem::forget
.
sourcepub fn read(&self) -> RwLockReadGuard<'_, R, T>
pub fn read(&self) -> RwLockReadGuard<'_, R, T>
Locks this RwLock
with shared read access, blocking the current thread
until it can be acquired.
The calling thread will be blocked until there are no more writers which hold the lock. There may be other readers currently inside the lock when this method returns.
Note that attempts to recursively acquire a read lock on a RwLock
when
the current thread already holds one may result in a deadlock.
Returns an RAII guard which will release this thread’s shared access once it is dropped.
sourcepub fn try_read(&self) -> Option<RwLockReadGuard<'_, R, T>>
pub fn try_read(&self) -> Option<RwLockReadGuard<'_, R, T>>
Attempts to acquire this RwLock
with shared read access.
If the access could not be granted at this time, then None
is returned.
Otherwise, an RAII guard is returned which will release the shared access
when it is dropped.
This function does not block.
sourcepub fn write(&self) -> RwLockWriteGuard<'_, R, T>
pub fn write(&self) -> RwLockWriteGuard<'_, R, T>
Locks this RwLock
with exclusive write access, blocking the current
thread until it can be acquired.
This function will not return while other writers or other readers currently have access to the lock.
Returns an RAII guard which will drop the write access of this RwLock
when dropped.
sourcepub fn try_write(&self) -> Option<RwLockWriteGuard<'_, R, T>>
pub fn try_write(&self) -> Option<RwLockWriteGuard<'_, R, T>>
Attempts to lock this RwLock
with exclusive write access.
If the lock could not be acquired at this time, then None
is returned.
Otherwise, an RAII guard is returned which will release the lock when
it is dropped.
This function does not block.
sourcepub fn is_locked_exclusive(&self) -> bool
pub fn is_locked_exclusive(&self) -> bool
Check if this RwLock
is currently exclusively locked.
sourcepub unsafe fn force_unlock_read(&self)
pub unsafe fn force_unlock_read(&self)
Forcibly unlocks a read lock.
This is useful when combined with mem::forget
to hold a lock without
the need to maintain a RwLockReadGuard
object alive, for example when
dealing with FFI.
§Safety
This method must only be called if the current thread logically owns a
RwLockReadGuard
but that guard has be discarded using mem::forget
.
Behavior is undefined if a rwlock is read-unlocked when not read-locked.
sourcepub unsafe fn force_unlock_write(&self)
pub unsafe fn force_unlock_write(&self)
Forcibly unlocks a write lock.
This is useful when combined with mem::forget
to hold a lock without
the need to maintain a RwLockWriteGuard
object alive, for example when
dealing with FFI.
§Safety
This method must only be called if the current thread logically owns a
RwLockWriteGuard
but that guard has be discarded using mem::forget
.
Behavior is undefined if a rwlock is write-unlocked when not write-locked.
sourcepub unsafe fn raw(&self) -> &R
pub unsafe fn raw(&self) -> &R
Returns the underlying raw reader-writer lock object.
Note that you will most likely need to import the RawRwLock
trait from
lock_api
to be able to call functions on the raw
reader-writer lock.
§Safety
This method is unsafe because it allows unlocking a mutex while still holding a reference to a lock guard.
sourcepub fn data_ptr(&self) -> *mut T
pub fn data_ptr(&self) -> *mut T
Returns a raw pointer to the underlying data.
This is useful when combined with mem::forget
to hold a lock without
the need to maintain a RwLockReadGuard
or RwLockWriteGuard
object
alive, for example when dealing with FFI.
§Safety
You must ensure that there are no data races when dereferencing the
returned pointer, for example if the current thread logically owns a
RwLockReadGuard
or RwLockWriteGuard
but that guard has been discarded
using mem::forget
.
sourcepub unsafe fn force_unlock_read_fair(&self)
pub unsafe fn force_unlock_read_fair(&self)
Forcibly unlocks a read lock using a fair unlock procotol.
This is useful when combined with mem::forget
to hold a lock without
the need to maintain a RwLockReadGuard
object alive, for example when
dealing with FFI.
§Safety
This method must only be called if the current thread logically owns a
RwLockReadGuard
but that guard has be discarded using mem::forget
.
Behavior is undefined if a rwlock is read-unlocked when not read-locked.
sourcepub unsafe fn force_unlock_write_fair(&self)
pub unsafe fn force_unlock_write_fair(&self)
Forcibly unlocks a write lock using a fair unlock procotol.
This is useful when combined with mem::forget
to hold a lock without
the need to maintain a RwLockWriteGuard
object alive, for example when
dealing with FFI.
§Safety
This method must only be called if the current thread logically owns a
RwLockWriteGuard
but that guard has be discarded using mem::forget
.
Behavior is undefined if a rwlock is write-unlocked when not write-locked.
sourcepub fn try_read_for(
&self,
timeout: <R as RawRwLockTimed>::Duration
) -> Option<RwLockReadGuard<'_, R, T>>
pub fn try_read_for( &self, timeout: <R as RawRwLockTimed>::Duration ) -> Option<RwLockReadGuard<'_, R, T>>
Attempts to acquire this RwLock
with shared read access until a timeout
is reached.
If the access could not be granted before the timeout expires, then
None
is returned. Otherwise, an RAII guard is returned which will
release the shared access when it is dropped.
sourcepub fn try_read_until(
&self,
timeout: <R as RawRwLockTimed>::Instant
) -> Option<RwLockReadGuard<'_, R, T>>
pub fn try_read_until( &self, timeout: <R as RawRwLockTimed>::Instant ) -> Option<RwLockReadGuard<'_, R, T>>
Attempts to acquire this RwLock
with shared read access until a timeout
is reached.
If the access could not be granted before the timeout expires, then
None
is returned. Otherwise, an RAII guard is returned which will
release the shared access when it is dropped.
sourcepub fn try_write_for(
&self,
timeout: <R as RawRwLockTimed>::Duration
) -> Option<RwLockWriteGuard<'_, R, T>>
pub fn try_write_for( &self, timeout: <R as RawRwLockTimed>::Duration ) -> Option<RwLockWriteGuard<'_, R, T>>
Attempts to acquire this RwLock
with exclusive write access until a
timeout is reached.
If the access could not be granted before the timeout expires, then
None
is returned. Otherwise, an RAII guard is returned which will
release the exclusive access when it is dropped.
sourcepub fn try_write_until(
&self,
timeout: <R as RawRwLockTimed>::Instant
) -> Option<RwLockWriteGuard<'_, R, T>>
pub fn try_write_until( &self, timeout: <R as RawRwLockTimed>::Instant ) -> Option<RwLockWriteGuard<'_, R, T>>
Attempts to acquire this RwLock
with exclusive write access until a
timeout is reached.
If the access could not be granted before the timeout expires, then
None
is returned. Otherwise, an RAII guard is returned which will
release the exclusive access when it is dropped.
sourcepub fn read_recursive(&self) -> RwLockReadGuard<'_, R, T>
pub fn read_recursive(&self) -> RwLockReadGuard<'_, R, T>
Locks this RwLock
with shared read access, blocking the current thread
until it can be acquired.
The calling thread will be blocked until there are no more writers which hold the lock. There may be other readers currently inside the lock when this method returns.
Unlike read
, this method is guaranteed to succeed without blocking if
another read lock is held at the time of the call. This allows a thread
to recursively lock a RwLock
. However using this method can cause
writers to starve since readers no longer block if a writer is waiting
for the lock.
Returns an RAII guard which will release this thread’s shared access once it is dropped.
sourcepub fn try_read_recursive(&self) -> Option<RwLockReadGuard<'_, R, T>>
pub fn try_read_recursive(&self) -> Option<RwLockReadGuard<'_, R, T>>
Attempts to acquire this RwLock
with shared read access.
If the access could not be granted at this time, then None
is returned.
Otherwise, an RAII guard is returned which will release the shared access
when it is dropped.
This method is guaranteed to succeed if another read lock is held at the
time of the call. See the documentation for read_recursive
for details.
This function does not block.
sourcepub fn try_read_recursive_for(
&self,
timeout: <R as RawRwLockTimed>::Duration
) -> Option<RwLockReadGuard<'_, R, T>>
pub fn try_read_recursive_for( &self, timeout: <R as RawRwLockTimed>::Duration ) -> Option<RwLockReadGuard<'_, R, T>>
Attempts to acquire this RwLock
with shared read access until a timeout
is reached.
If the access could not be granted before the timeout expires, then
None
is returned. Otherwise, an RAII guard is returned which will
release the shared access when it is dropped.
This method is guaranteed to succeed without blocking if another read
lock is held at the time of the call. See the documentation for
read_recursive
for details.
sourcepub fn try_read_recursive_until(
&self,
timeout: <R as RawRwLockTimed>::Instant
) -> Option<RwLockReadGuard<'_, R, T>>
pub fn try_read_recursive_until( &self, timeout: <R as RawRwLockTimed>::Instant ) -> Option<RwLockReadGuard<'_, R, T>>
Attempts to acquire this RwLock
with shared read access until a timeout
is reached.
If the access could not be granted before the timeout expires, then
None
is returned. Otherwise, an RAII guard is returned which will
release the shared access when it is dropped.
sourcepub unsafe fn make_upgradable_guard_unchecked(
&self
) -> RwLockUpgradableReadGuard<'_, R, T>
pub unsafe fn make_upgradable_guard_unchecked( &self ) -> RwLockUpgradableReadGuard<'_, R, T>
Creates a new RwLockUpgradableReadGuard
without checking if the lock is held.
§Safety
This method must only be called if the thread logically holds an upgradable read lock.
This function does not increment the read count of the lock. Calling this function when a
guard has already been produced is undefined behaviour unless the guard was forgotten
with mem::forget
.`
sourcepub fn upgradable_read(&self) -> RwLockUpgradableReadGuard<'_, R, T>
pub fn upgradable_read(&self) -> RwLockUpgradableReadGuard<'_, R, T>
Locks this RwLock
with upgradable read access, blocking the current thread
until it can be acquired.
The calling thread will be blocked until there are no more writers or other upgradable reads which hold the lock. There may be other readers currently inside the lock when this method returns.
Returns an RAII guard which will release this thread’s shared access once it is dropped.
sourcepub fn try_upgradable_read(&self) -> Option<RwLockUpgradableReadGuard<'_, R, T>>
pub fn try_upgradable_read(&self) -> Option<RwLockUpgradableReadGuard<'_, R, T>>
Attempts to acquire this RwLock
with upgradable read access.
If the access could not be granted at this time, then None
is returned.
Otherwise, an RAII guard is returned which will release the shared access
when it is dropped.
This function does not block.
sourcepub fn try_upgradable_read_for(
&self,
timeout: <R as RawRwLockTimed>::Duration
) -> Option<RwLockUpgradableReadGuard<'_, R, T>>
pub fn try_upgradable_read_for( &self, timeout: <R as RawRwLockTimed>::Duration ) -> Option<RwLockUpgradableReadGuard<'_, R, T>>
Attempts to acquire this RwLock
with upgradable read access until a timeout
is reached.
If the access could not be granted before the timeout expires, then
None
is returned. Otherwise, an RAII guard is returned which will
release the shared access when it is dropped.
sourcepub fn try_upgradable_read_until(
&self,
timeout: <R as RawRwLockTimed>::Instant
) -> Option<RwLockUpgradableReadGuard<'_, R, T>>
pub fn try_upgradable_read_until( &self, timeout: <R as RawRwLockTimed>::Instant ) -> Option<RwLockUpgradableReadGuard<'_, R, T>>
Attempts to acquire this RwLock
with upgradable read access until a timeout
is reached.
If the access could not be granted before the timeout expires, then
None
is returned. Otherwise, an RAII guard is returned which will
release the shared access when it is dropped.
Trait Implementations§
source§impl Debug for RangeComponentResults
impl Debug for RangeComponentResults
source§impl Default for RangeComponentResults
impl Default for RangeComponentResults
source§fn default() -> RangeComponentResults
fn default() -> RangeComponentResults
source§impl Deref for RangeComponentResults
impl Deref for RangeComponentResults
source§impl SizeBytes for RangeComponentResults
impl SizeBytes for RangeComponentResults
source§fn heap_size_bytes(&self) -> u64
fn heap_size_bytes(&self) -> u64
self
on the heap, in bytes.source§fn total_size_bytes(&self) -> u64
fn total_size_bytes(&self) -> u64
self
in bytes, accounting for both stack and heap space.source§fn stack_size_bytes(&self) -> u64
fn stack_size_bytes(&self) -> u64
self
on the stack, in bytes. Read moreAuto Trait Implementations§
impl Freeze for RangeComponentResults
impl !RefUnwindSafe for RangeComponentResults
impl Send for RangeComponentResults
impl Sync for RangeComponentResults
impl Unpin for RangeComponentResults
impl !UnwindSafe for RangeComponentResults
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
source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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> ⓘ
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> ⓘ
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