LockLazyQuery

Struct LockLazyQuery 

Source
pub struct LockLazyQuery<'a, T, L, I>
where T: 'static, L: LockValue<T> + 'a, I: Iterator<Item = &'a L>,
{ /* private fields */ }
Expand description

Lazy query for locked data with early termination.

Implementations§

Source§

impl<'a, T, L, I> LockLazyQuery<'a, T, L, I>
where T: 'static, L: LockValue<T> + 'a, I: Iterator<Item = &'a L> + 'a,

Source

pub fn new(iter: I) -> LockLazyQuery<'a, T, L, I>

Create a new lazy query from an iterator of locks.

Source

pub fn where_<F, P>( self, path: KeyPaths<T, F>, predicate: P, ) -> LockLazyQuery<'a, T, L, impl Iterator<Item = &'a L> + 'a>
where F: 'static, P: Fn(&F) -> bool + 'a,

Filter using a key-path predicate (lazy).

Source

pub fn select_lazy<F>( self, path: KeyPaths<T, F>, ) -> impl Iterator<Item = F> + 'a
where F: Clone + 'static,

Map to a field value (lazy).

This allows you to select only specific fields from locked data without cloning the entire object. Perfect for projecting data efficiently.

§Example
// Select only product names (not full objects)
let names: Vec<String> = products
    .lock_lazy_query()
    .where_(Product::price(), |&p| p > 100.0)
    .select_lazy(Product::name())
    .collect();
 
// Select only IDs  
let ids: Vec<u32> = products
    .lock_lazy_query()
    .where_(Product::stock(), |&s| s > 0)
    .select_lazy(Product::id())
    .take(10)
    .collect();
 
// Select prices and compute sum
let total: f64 = products
    .lock_lazy_query()
    .where_(Product::category(), |c| c == "Electronics")
    .select_lazy(Product::price())
    .sum();

Performance Note: This is much more efficient than collecting full objects and then extracting fields, as it only clones the specific field value.

Source

pub fn take_lazy(self, n: usize) -> impl Iterator<Item = T> + 'a
where T: Clone,

Take first N items (lazy).

Source

pub fn skip_lazy( self, n: usize, ) -> LockLazyQuery<'a, T, L, impl Iterator<Item = &'a L> + 'a>

Skip first N items (lazy).

Source

pub fn count(self) -> usize

Count matching items (terminal).

Source

pub fn first(self) -> Option<T>
where T: Clone,

Get first matching item (terminal).

Source

pub fn any(self) -> bool

Check if any items match (terminal).

Source

pub fn collect(self) -> Vec<T>
where T: Clone,

Collect into Vec (terminal).

Source

pub fn all(self) -> Vec<T>
where T: Clone,

Get all matching items (alias for collect, similar to LockQuery::all).

This provides a familiar API for users coming from LockQuery.

§Example
let all_items: Vec<Product> = products
    .lock_lazy_query()
    .where_(Product::price(), |&p| p > 100.0)
    .all();
Source

pub fn sum<F>(self, path: KeyPaths<T, F>) -> F
where F: Clone + Add<Output = F> + Default + 'static,

Sum a numeric field (terminal).

Efficiently computes the sum without collecting all items into a Vec first.

§Example
// Sum all prices
let total_value: f64 = products
    .lock_lazy_query()
    .where_(Product::stock(), |&s| s > 0)
    .sum(Product::price());
 
// Sum stock quantities
let total_stock: u32 = products
    .lock_lazy_query()
    .where_(Product::category(), |c| c == "Electronics")
    .sum(Product::stock());
Source

pub fn avg(self, path: KeyPaths<T, f64>) -> Option<f64>

Calculate average of f64 field (terminal).

Returns None if no items match.

§Example
let avg_price = products
    .lock_lazy_query()
    .where_(Product::stock(), |&s| s > 0)
    .avg(Product::price());
 
match avg_price {
    Some(avg) => println!("Average price: ${:.2}", avg),
    None => println!("No items found"),
}
Source

pub fn min<F>(self, path: KeyPaths<T, F>) -> Option<F>
where F: Ord + Clone + 'static,

Find minimum value (terminal).

Returns None if no items match.

§Example
let min_stock = products
    .lock_lazy_query()
    .where_(Product::stock(), |&s| s > 0)
    .min(Product::stock());
 
println!("Minimum stock level: {:?}", min_stock);
Source

pub fn max<F>(self, path: KeyPaths<T, F>) -> Option<F>
where F: Ord + Clone + 'static,

Find maximum value (terminal).

Returns None if no items match.

§Example
let max_price = products
    .lock_lazy_query()
    .where_(Product::category(), |c| c == "Electronics")
    .max(Product::price());
 
println!("Most expensive: ${:.2}", max_price.unwrap_or(0.0));
Source

pub fn min_float(self, path: KeyPaths<T, f64>) -> Option<f64>

Find minimum float value (terminal).

Handles f64 values correctly with partial ordering.

§Example
let cheapest = products
    .lock_lazy_query()
    .where_(Product::stock(), |&s| s > 0)
    .min_float(Product::price());
Source

pub fn max_float(self, path: KeyPaths<T, f64>) -> Option<f64>

Find maximum float value (terminal).

Handles f64 values correctly with partial ordering.

§Example
let most_expensive = products
    .lock_lazy_query()
    .where_(Product::stock(), |&s| s > 0)
    .max_float(Product::price());
Source

pub fn exists(self) -> bool

Check if any items exist matching the criteria (terminal).

Alias for any(), provides SQL-like EXISTS semantics. Stops at the first match - very efficient!

§Example
let has_expensive = products
    .lock_lazy_query()
    .where_(Product::price(), |&p| p > 1000.0)
    .exists();
 
if has_expensive {
    println!("We have luxury items!");
}
 
// SQL equivalent: SELECT EXISTS(SELECT 1 FROM products WHERE price > 1000)
Source

pub fn limit(self, n: usize) -> impl Iterator<Item = T> + 'a
where T: Clone,

Limit results to first N items (lazy).

Alias for creating a limited iterator. Use with .collect() or .all().

§Example
let top_5: Vec<Product> = products
    .lock_lazy_query()
    .where_(Product::stock(), |&s| s > 10)
    .limit(5)
    .collect();
 
// SQL equivalent: SELECT * FROM products WHERE stock > 10 LIMIT 5
Source

pub fn skip( self, n: usize, ) -> LockLazyQuery<'a, T, L, impl Iterator<Item = &'a L> + 'a>

Skip first N items (lazy).

Alias for skip_lazy() with better SQL-like naming.

§Example
// Get second page (skip 10, take 10)
let page_2 = products
    .lock_lazy_query()
    .skip(10)
    .limit(10)
    .collect();
 
// SQL equivalent: SELECT * FROM products LIMIT 10 OFFSET 10
Source

pub fn distinct<F>(self, path: KeyPaths<T, F>) -> Vec<F>
where F: Eq + Hash + Clone + 'static,

Get distinct values for a field (terminal).

Returns a Vec of unique field values. Uses HashSet internally.

§Example
let categories: Vec<String> = products
    .lock_lazy_query()
    .where_(Product::stock(), |&s| s > 0)
    .distinct(Product::category());
 
println!("Available categories: {:?}", categories);
 
// SQL equivalent: SELECT DISTINCT category FROM products WHERE stock > 0
Source

pub fn last(self) -> Option<T>
where T: Clone,

Get last matching item (terminal).

Note: This consumes the entire iterator to find the last item. Less efficient than first() for lazy evaluation.

§Example
let last_product = products
    .lock_lazy_query()
    .where_(Product::stock(), |&s| s > 0)
    .last();
Source

pub fn nth(self, n: usize) -> Option<T>
where T: Clone,

Find item at specific index (terminal).

Returns None if index is out of bounds.

§Example
let third_item = products
    .lock_lazy_query()
    .where_(Product::stock(), |&s| s > 0)
    .nth(2);  // 0-indexed, so this is the 3rd item
Source

pub fn all_match<F, P>(self, path: KeyPaths<T, F>, predicate: P) -> bool
where F: 'static, P: Fn(&F) -> bool + 'a,

Check if all items match a predicate (terminal).

Returns true if all items match, false otherwise. Short-circuits on first non-match.

§Example
let all_in_stock = products
    .lock_lazy_query()
    .where_(Product::category(), |c| c == "Electronics")
    .all_match(Product::stock(), |&s| s > 0);
 
if all_in_stock {
    println!("All electronics are in stock!");
}
Source

pub fn find<F, P>(self, path: KeyPaths<T, F>, predicate: P) -> Option<T>
where F: 'static, P: Fn(&F) -> bool + 'a, T: Clone,

Find first item matching an additional predicate (terminal).

Like first() but with an extra condition.

§Example
let expensive_laptop = products
    .lock_lazy_query()
    .where_(Product::category(), |c| c == "Electronics")
    .find(Product::price(), |&p| p > 500.0);
Source

pub fn count_where<F, P>(self, path: KeyPaths<T, F>, predicate: P) -> usize
where F: 'static, P: Fn(&F) -> bool + 'a,

Count items matching an additional condition (terminal).

Like count() but with a field-specific predicate.

§Example
let expensive_count = products
    .lock_lazy_query()
    .where_(Product::category(), |c| c == "Electronics")
    .count_where(Product::price(), |&p| p > 500.0);
Source

pub fn where_after_systemtime( self, path: KeyPaths<T, SystemTime>, reference: SystemTime, ) -> LockLazyQuery<'a, T, L, impl Iterator<Item = &'a L> + 'a>

Filter by SystemTime being after a reference time.

§Arguments
  • path - The key-path to the SystemTime field
  • reference - The reference time to compare against
§Example
let recent = events
    .lock_lazy_query()
    .where_after_systemtime(Event::timestamp(), cutoff_time);
Source

pub fn where_before_systemtime( self, path: KeyPaths<T, SystemTime>, reference: SystemTime, ) -> LockLazyQuery<'a, T, L, impl Iterator<Item = &'a L> + 'a>

Filter by SystemTime being before a reference time.

§Arguments
  • path - The key-path to the SystemTime field
  • reference - The reference time to compare against
§Example
let old = events
    .lock_lazy_query()
    .where_before_systemtime(Event::timestamp(), cutoff_time);
Source

pub fn where_between_systemtime( self, path: KeyPaths<T, SystemTime>, start: SystemTime, end: SystemTime, ) -> LockLazyQuery<'a, T, L, impl Iterator<Item = &'a L> + 'a>

Filter by SystemTime being between two times (inclusive).

§Arguments
  • path - The key-path to the SystemTime field
  • start - The start time
  • end - The end time
§Example
let range = events
    .lock_lazy_query()
    .where_between_systemtime(Event::timestamp(), start, end);
Source

pub fn order_by<F>(self, path: KeyPaths<T, F>) -> Vec<T>
where F: Ord + Clone + 'static, T: Clone,

Orders results by a field in ascending order (terminal).

Note: This method requires T: Clone as it creates owned sorted copies. This is a terminal operation that collects and sorts all matching items.

§Arguments
  • path - The key-path to the field to order by
§Example
let sorted = products
    .lock_lazy_query()
    .where_(Product::stock(), |&s| s > 0)
    .order_by(Product::name());
Source

pub fn order_by_desc<F>(self, path: KeyPaths<T, F>) -> Vec<T>
where F: Ord + Clone + 'static, T: Clone,

Orders results by a field in descending order (terminal).

Note: This method requires T: Clone as it creates owned sorted copies. This is a terminal operation that collects and sorts all matching items.

§Arguments
  • path - The key-path to the field to order by
§Example
let sorted = products
    .lock_lazy_query()
    .where_(Product::stock(), |&s| s > 0)
    .order_by_desc(Product::stock());
Source

pub fn order_by_float(self, path: KeyPaths<T, f64>) -> Vec<T>
where T: Clone,

Orders results by a float field in ascending order (terminal).

Note: This method requires T: Clone as it creates owned sorted copies. This is a terminal operation that collects and sorts all matching items.

§Arguments
  • path - The key-path to the f64 field to order by
§Example
let sorted = products
    .lock_lazy_query()
    .where_(Product::stock(), |&s| s > 0)
    .order_by_float(Product::price());
Source

pub fn order_by_float_desc(self, path: KeyPaths<T, f64>) -> Vec<T>
where T: Clone,

Orders results by a float field in descending order (terminal).

Note: This method requires T: Clone as it creates owned sorted copies. This is a terminal operation that collects and sorts all matching items.

§Arguments
  • path - The key-path to the f64 field to order by
§Example
let sorted = products
    .lock_lazy_query()
    .where_(Product::stock(), |&s| s > 0)
    .order_by_float_desc(Product::rating());
Source

pub fn group_by<F>(self, path: KeyPaths<T, F>) -> HashMap<F, Vec<T>>
where F: Eq + Hash + Clone + 'static, T: Clone,

Groups results by a field value (terminal).

Note: This method requires T: Clone as it creates owned copies in groups. This is a terminal operation that collects all matching items into groups.

§Arguments
  • path - The key-path to the field to group by
§Example
let by_category = products
    .lock_lazy_query()
    .where_(Product::stock(), |&s| s > 0)
    .group_by(Product::category());
 
for (category, products) in by_category {
    println!("{}: {} products", category, products.len());
}
 
// SQL equivalent: SELECT * FROM products WHERE stock > 0 GROUP BY category
Source§

impl<'a, T, L, I> LockLazyQuery<'a, T, L, I>
where T: 'static, L: LockValue<T> + 'a, I: Iterator<Item = &'a L> + 'a,

Source

pub fn where_after<Tz>( self, path: KeyPaths<T, DateTime<Tz>>, reference: DateTime<Tz>, ) -> LockLazyQuery<'a, T, L, impl Iterator<Item = &'a L> + 'a>
where Tz: TimeZone + 'static, <Tz as TimeZone>::Offset: Display,

Filter by DateTime being after a reference time.

§Arguments
  • path - The key-path to the DateTime field
  • reference - The reference time to compare against
§Example
let recent = events
    .lock_lazy_query()
    .where_after(Event::timestamp(), cutoff_time);
Source

pub fn where_before<Tz>( self, path: KeyPaths<T, DateTime<Tz>>, reference: DateTime<Tz>, ) -> LockLazyQuery<'a, T, L, impl Iterator<Item = &'a L> + 'a>
where Tz: TimeZone + 'static, <Tz as TimeZone>::Offset: Display,

Filter by DateTime being before a reference time.

§Arguments
  • path - The key-path to the DateTime field
  • reference - The reference time to compare against
§Example
let old = events
    .lock_lazy_query()
    .where_before(Event::timestamp(), cutoff_time);
Source

pub fn where_between<Tz>( self, path: KeyPaths<T, DateTime<Tz>>, start: DateTime<Tz>, end: DateTime<Tz>, ) -> LockLazyQuery<'a, T, L, impl Iterator<Item = &'a L> + 'a>
where Tz: TimeZone + 'static, <Tz as TimeZone>::Offset: Display,

Filter by DateTime being between two times (inclusive).

§Arguments
  • path - The key-path to the DateTime field
  • start - The start time
  • end - The end time
§Example
let range = events
    .lock_lazy_query()
    .where_between(Event::timestamp(), start, end);
Source

pub fn where_today<Tz>( self, path: KeyPaths<T, DateTime<Tz>>, now: DateTime<Tz>, ) -> LockLazyQuery<'a, T, L, impl Iterator<Item = &'a L> + 'a>
where Tz: TimeZone + 'static, <Tz as TimeZone>::Offset: Display,

Filter by DateTime being today.

§Arguments
  • path - The key-path to the DateTime field
  • now - The current DateTime to compare against
§Example
let today = events
    .lock_lazy_query()
    .where_today(Event::timestamp(), Utc::now());
Source

pub fn where_year<Tz>( self, path: KeyPaths<T, DateTime<Tz>>, year: i32, ) -> LockLazyQuery<'a, T, L, impl Iterator<Item = &'a L> + 'a>
where Tz: TimeZone + 'static, <Tz as TimeZone>::Offset: Display,

Filter by DateTime year.

§Arguments
  • path - The key-path to the DateTime field
  • year - The year to filter by
§Example
let this_year = events
    .lock_lazy_query()
    .where_year(Event::timestamp(), 2024);
Source

pub fn where_month<Tz>( self, path: KeyPaths<T, DateTime<Tz>>, month: u32, ) -> LockLazyQuery<'a, T, L, impl Iterator<Item = &'a L> + 'a>
where Tz: TimeZone + 'static, <Tz as TimeZone>::Offset: Display,

Filter by DateTime month.

§Arguments
  • path - The key-path to the DateTime field
  • month - The month to filter by (1-12)
§Example
let december = events
    .lock_lazy_query()
    .where_month(Event::timestamp(), 12);
Source

pub fn where_day<Tz>( self, path: KeyPaths<T, DateTime<Tz>>, day: u32, ) -> LockLazyQuery<'a, T, L, impl Iterator<Item = &'a L> + 'a>
where Tz: TimeZone + 'static, <Tz as TimeZone>::Offset: Display,

Filter by DateTime day.

§Arguments
  • path - The key-path to the DateTime field
  • day - The day to filter by (1-31)
§Example
let first = events
    .lock_lazy_query()
    .where_day(Event::timestamp(), 1);
Source

pub fn where_weekend<Tz>( self, path: KeyPaths<T, DateTime<Tz>>, ) -> LockLazyQuery<'a, T, L, impl Iterator<Item = &'a L> + 'a>
where Tz: TimeZone + 'static, <Tz as TimeZone>::Offset: Display,

Filter by weekend dates (Saturday and Sunday).

§Arguments
  • path - The key-path to the DateTime field
§Example
let weekend_events = events
    .lock_lazy_query()
    .where_weekend(Event::timestamp());
Source

pub fn where_weekday<Tz>( self, path: KeyPaths<T, DateTime<Tz>>, ) -> LockLazyQuery<'a, T, L, impl Iterator<Item = &'a L> + 'a>
where Tz: TimeZone + 'static, <Tz as TimeZone>::Offset: Display,

Filter by weekday dates (Monday through Friday).

§Arguments
  • path - The key-path to the DateTime field
§Example
let weekday_events = events
    .lock_lazy_query()
    .where_weekday(Event::timestamp());
Source

pub fn where_business_hours<Tz>( self, path: KeyPaths<T, DateTime<Tz>>, ) -> LockLazyQuery<'a, T, L, impl Iterator<Item = &'a L> + 'a>
where Tz: TimeZone + 'static, <Tz as TimeZone>::Offset: Display,

Filter by business hours (9 AM - 5 PM).

§Arguments
  • path - The key-path to the DateTime field
§Example
let business_hours = events
    .lock_lazy_query()
    .where_business_hours(Event::timestamp());
Source§

impl<'a, T, L, I> LockLazyQuery<'a, T, L, I>
where T: 'static, L: LockValue<T> + 'a, I: Iterator<Item = &'a L> + 'a,

Source

pub fn min_timestamp(self, path: KeyPaths<T, i64>) -> Option<i64>

Finds minimum i64 timestamp value (terminal operation).

§Example
let earliest = events
    .lock_lazy_query()
    .min_timestamp(Event::created_at());
Source

pub fn max_timestamp(self, path: KeyPaths<T, i64>) -> Option<i64>

Finds maximum i64 timestamp value (terminal operation).

§Example
let latest = events
    .lock_lazy_query()
    .max_timestamp(Event::created_at());
Source

pub fn avg_timestamp(self, path: KeyPaths<T, i64>) -> Option<i64>

Computes average of i64 timestamp values (terminal operation).

§Example
let avg = events
    .lock_lazy_query()
    .avg_timestamp(Event::created_at());
Source

pub fn sum_timestamp(self, path: KeyPaths<T, i64>) -> i64

Computes sum of i64 timestamp values (terminal operation).

§Example
let total = events
    .lock_lazy_query()
    .sum_timestamp(Event::created_at());
Source

pub fn count_timestamp(self, path: KeyPaths<T, i64>) -> usize

Counts i64 timestamp values (terminal operation).

§Example
let count = events
    .lock_lazy_query()
    .count_timestamp(Event::created_at());
Source

pub fn where_after_timestamp( self, path: KeyPaths<T, i64>, reference: i64, ) -> LockLazyQuery<'a, T, L, impl Iterator<Item = &'a L> + 'a>

Filter by i64 timestamp being after a reference time (lazy).

§Arguments
  • path - The key-path to the i64 timestamp field
  • reference - The reference timestamp to compare against
§Example
let recent = events
    .lock_lazy_query()
    .where_after_timestamp(Event::created_at(), cutoff_time);
Source

pub fn where_before_timestamp( self, path: KeyPaths<T, i64>, reference: i64, ) -> LockLazyQuery<'a, T, L, impl Iterator<Item = &'a L> + 'a>

Filter by i64 timestamp being before a reference time (lazy).

§Arguments
  • path - The key-path to the i64 timestamp field
  • reference - The reference timestamp to compare against
§Example
let old = events
    .lock_lazy_query()
    .where_before_timestamp(Event::created_at(), cutoff_time);
Source

pub fn where_between_timestamp( self, path: KeyPaths<T, i64>, start: i64, end: i64, ) -> LockLazyQuery<'a, T, L, impl Iterator<Item = &'a L> + 'a>

Filter by i64 timestamp being between two times (inclusive, lazy).

§Arguments
  • path - The key-path to the i64 timestamp field
  • start - The start timestamp
  • end - The end timestamp
§Example
let range = events
    .lock_lazy_query()
    .where_between_timestamp(Event::created_at(), start, end);
Source

pub fn where_last_days_timestamp( self, path: KeyPaths<T, i64>, days: i64, ) -> LockLazyQuery<'a, T, L, impl Iterator<Item = &'a L> + 'a>

Filter by i64 timestamp being within the last N days (lazy).

§Arguments
  • path - The key-path to the i64 timestamp field
  • days - Number of days to look back
§Example
let recent = events
    .lock_lazy_query()
    .where_last_days_timestamp(Event::created_at(), 30);
Source

pub fn where_next_days_timestamp( self, path: KeyPaths<T, i64>, days: i64, ) -> LockLazyQuery<'a, T, L, impl Iterator<Item = &'a L> + 'a>

Filter by i64 timestamp being within the next N days (lazy).

§Arguments
  • path - The key-path to the i64 timestamp field
  • days - Number of days to look forward
§Example
let upcoming = events
    .lock_lazy_query()
    .where_next_days_timestamp(Event::scheduled_at(), 7);
Source

pub fn where_last_hours_timestamp( self, path: KeyPaths<T, i64>, hours: i64, ) -> LockLazyQuery<'a, T, L, impl Iterator<Item = &'a L> + 'a>

Filter by i64 timestamp being within the last N hours (lazy).

§Arguments
  • path - The key-path to the i64 timestamp field
  • hours - Number of hours to look back
§Example
let recent = events
    .lock_lazy_query()
    .where_last_hours_timestamp(Event::created_at(), 24);
Source

pub fn where_next_hours_timestamp( self, path: KeyPaths<T, i64>, hours: i64, ) -> LockLazyQuery<'a, T, L, impl Iterator<Item = &'a L> + 'a>

Filter by i64 timestamp being within the next N hours (lazy).

§Arguments
  • path - The key-path to the i64 timestamp field
  • hours - Number of hours to look forward
§Example
let upcoming = events
    .lock_lazy_query()
    .where_next_hours_timestamp(Event::scheduled_at(), 2);
Source

pub fn where_last_minutes_timestamp( self, path: KeyPaths<T, i64>, minutes: i64, ) -> LockLazyQuery<'a, T, L, impl Iterator<Item = &'a L> + 'a>

Filter by i64 timestamp being within the last N minutes (lazy).

§Arguments
  • path - The key-path to the i64 timestamp field
  • minutes - Number of minutes to look back
§Example
let recent = events
    .lock_lazy_query()
    .where_last_minutes_timestamp(Event::created_at(), 60);
Source

pub fn where_next_minutes_timestamp( self, path: KeyPaths<T, i64>, minutes: i64, ) -> LockLazyQuery<'a, T, L, impl Iterator<Item = &'a L> + 'a>

Filter by i64 timestamp being within the next N minutes (lazy).

§Arguments
  • path - The key-path to the i64 timestamp field
  • minutes - Number of minutes to look forward
§Example
let upcoming = events
    .lock_lazy_query()
    .where_next_minutes_timestamp(Event::scheduled_at(), 30);

Auto Trait Implementations§

§

impl<'a, T, L, I> Freeze for LockLazyQuery<'a, T, L, I>
where I: Freeze,

§

impl<'a, T, L, I> RefUnwindSafe for LockLazyQuery<'a, T, L, I>

§

impl<'a, T, L, I> Send for LockLazyQuery<'a, T, L, I>
where I: Send, T: Sync,

§

impl<'a, T, L, I> Sync for LockLazyQuery<'a, T, L, I>
where I: Sync, T: Sync,

§

impl<'a, T, L, I> Unpin for LockLazyQuery<'a, T, L, I>
where I: Unpin,

§

impl<'a, T, L, I> UnwindSafe for LockLazyQuery<'a, T, L, I>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.