Struct object_space::TreeObjectSpace [−][src]
pub struct TreeObjectSpace { /* fields omitted */ }
A thread-safe reference ObjectSpace
implementation
Implementation
A TreeObjectSpace
is a HashMap
between a TypeId
and the actual Entry
structure holding the structs.
Before structs are stored in Entry
,
they are serialized into a JSON-like structure and then flattened.
An Entry
is a HashMap
whose key is a flattened field and
value is a BTreeMap
between possible values of the field
and the Vec
of structs containing the corresponding value of such field.
Mutex
is used sparingly to ensure blocking read
and take
calls do not hijack CPU cycles
Methods
impl TreeObjectSpace
[src]
impl TreeObjectSpace
pub fn new() -> TreeObjectSpace
[src]
pub fn new() -> TreeObjectSpace
Trait Implementations
impl Default for TreeObjectSpace
[src]
impl Default for TreeObjectSpace
fn default() -> TreeObjectSpace
[src]
fn default() -> TreeObjectSpace
Returns the "default value" for a type. Read more
impl ObjectSpace for TreeObjectSpace
[src]
impl ObjectSpace for TreeObjectSpace
fn write<T>(&self, obj: T) where
T: Serialize + Deserialize<'de> + 'static,
[src]
fn write<T>(&self, obj: T) where
T: Serialize + Deserialize<'de> + 'static,
Add a struct to the object space. Read more
fn try_read<T>(&self) -> Option<T> where
T: Serialize + Deserialize<'de> + 'static,
[src]
fn try_read<T>(&self) -> Option<T> where
T: Serialize + Deserialize<'de> + 'static,
Return a copy of a struct of type T. The operation is non-blocking and will returns None if no struct satisfies condition. Read more
fn read_all<'a, T>(&'a self) -> Box<Iterator<Item = T> + 'a> where
T: Serialize + Deserialize<'de> + 'static,
[src]
fn read_all<'a, T>(&'a self) -> Box<Iterator<Item = T> + 'a> where
T: Serialize + Deserialize<'de> + 'static,
Return copies of all structs of type T. The operation is non-blocking and will returns None if no struct satisfies condition. Read more
fn read<T>(&self) -> T where
T: Serialize + Deserialize<'de> + 'static,
[src]
fn read<T>(&self) -> T where
T: Serialize + Deserialize<'de> + 'static,
Return a copy of a struct of type T. The operation blocks until such a struct is found. Read more
fn try_take<T>(&self) -> Option<T> where
T: Serialize + Deserialize<'de> + 'static,
[src]
fn try_take<T>(&self) -> Option<T> where
T: Serialize + Deserialize<'de> + 'static,
Remove and return a struct of type T. The operation is non-blocking and will returns None if no struct satisfies condition. Read more
fn take_all<'a, T>(&'a self) -> Box<Iterator<Item = T> + 'a> where
T: Serialize + Deserialize<'de> + 'static,
[src]
fn take_all<'a, T>(&'a self) -> Box<Iterator<Item = T> + 'a> where
T: Serialize + Deserialize<'de> + 'static,
Remove and return all structs of type T. The operation is non-blocking and will returns None if no struct satisfies condition. Read more
fn take<T>(&self) -> T where
T: Serialize + Deserialize<'de> + 'static,
[src]
fn take<T>(&self) -> T where
T: Serialize + Deserialize<'de> + 'static,
Remove and return a struct of type T. The operation blocks until such a struct is found. # Example Read more
impl RangeLookupObjectSpace<i64> for TreeObjectSpace
[src]
impl RangeLookupObjectSpace<i64> for TreeObjectSpace
fn try_read_by_range<T, R>(&self, field: &str, range: R) -> Option<T> where
T: Serialize + Deserialize<'de> + 'static,
R: RangeBounds<i64> + Clone,
[src]
fn try_read_by_range<T, R>(&self, field: &str, range: R) -> Option<T> where
T: Serialize + Deserialize<'de> + 'static,
R: RangeBounds<i64> + Clone,
Given a path to an element of the struct and a range of possible values, return a copy of a struct whose specified element is within the range. The operation is non-blocking and will returns None if no struct satisfies condition. Read more
fn read_all_by_range<'a, T, R>(
&'a self,
field: &str,
range: R
) -> Box<Iterator<Item = T> + 'a> where
T: Deserialize<'de> + 'static,
R: RangeBounds<i64> + Clone,
[src]
fn read_all_by_range<'a, T, R>(
&'a self,
field: &str,
range: R
) -> Box<Iterator<Item = T> + 'a> where
T: Deserialize<'de> + 'static,
R: RangeBounds<i64> + Clone,
Given a path to an element of the struct and a range of possible values, return copies of all structs whose specified element is within the range. Read more
fn read_by_range<T, R>(&self, field: &str, range: R) -> T where
T: Serialize + Deserialize<'de> + 'static,
R: RangeBounds<i64> + Clone,
[src]
fn read_by_range<T, R>(&self, field: &str, range: R) -> T where
T: Serialize + Deserialize<'de> + 'static,
R: RangeBounds<i64> + Clone,
Given a path to an element of the struct and a range of possible values, return a copy of a struct whose specified element is within the range. The operation blocks until a struct satisfies the condition is found. Read more
fn try_take_by_range<T, R>(&self, field: &str, range: R) -> Option<T> where
T: Serialize + Deserialize<'de> + 'static,
R: RangeBounds<i64> + Clone,
[src]
fn try_take_by_range<T, R>(&self, field: &str, range: R) -> Option<T> where
T: Serialize + Deserialize<'de> + 'static,
R: RangeBounds<i64> + Clone,
Given a path to an element of the struct and a range of possible values, remove and return a struct whose specified element is within the range. The operation is non-blocking and will returns None if no struct satisfies condition. Read more
fn take_all_by_range<'a, T, R>(
&'a self,
field: &str,
range: R
) -> Box<Iterator<Item = T> + 'a> where
T: Deserialize<'de> + 'static,
R: RangeBounds<i64> + Clone,
[src]
fn take_all_by_range<'a, T, R>(
&'a self,
field: &str,
range: R
) -> Box<Iterator<Item = T> + 'a> where
T: Deserialize<'de> + 'static,
R: RangeBounds<i64> + Clone,
Given a path to an element of the struct and a range of possible values, remove and return all structs whose specified element is within the range. Read more
fn take_by_range<T, R>(&self, field: &str, range: R) -> T where
T: Serialize + Deserialize<'de> + 'static,
R: RangeBounds<i64> + Clone,
[src]
fn take_by_range<T, R>(&self, field: &str, range: R) -> T where
T: Serialize + Deserialize<'de> + 'static,
R: RangeBounds<i64> + Clone,
Given a path to an element of the struct and a range of possible values, remove and return a struct whose specified element is within the range. The operation blocks until a struct satisfies the condition is found. Read more
impl RangeLookupObjectSpace<String> for TreeObjectSpace
[src]
impl RangeLookupObjectSpace<String> for TreeObjectSpace
fn try_read_by_range<T, R>(&self, field: &str, range: R) -> Option<T> where
T: Serialize + Deserialize<'de> + 'static,
R: RangeBounds<String> + Clone,
[src]
fn try_read_by_range<T, R>(&self, field: &str, range: R) -> Option<T> where
T: Serialize + Deserialize<'de> + 'static,
R: RangeBounds<String> + Clone,
Given a path to an element of the struct and a range of possible values, return a copy of a struct whose specified element is within the range. The operation is non-blocking and will returns None if no struct satisfies condition. Read more
fn read_all_by_range<'a, T, R>(
&'a self,
field: &str,
range: R
) -> Box<Iterator<Item = T> + 'a> where
T: Deserialize<'de> + 'static,
R: RangeBounds<String> + Clone,
[src]
fn read_all_by_range<'a, T, R>(
&'a self,
field: &str,
range: R
) -> Box<Iterator<Item = T> + 'a> where
T: Deserialize<'de> + 'static,
R: RangeBounds<String> + Clone,
Given a path to an element of the struct and a range of possible values, return copies of all structs whose specified element is within the range. Read more
fn read_by_range<T, R>(&self, field: &str, range: R) -> T where
T: Serialize + Deserialize<'de> + 'static,
R: RangeBounds<String> + Clone,
[src]
fn read_by_range<T, R>(&self, field: &str, range: R) -> T where
T: Serialize + Deserialize<'de> + 'static,
R: RangeBounds<String> + Clone,
Given a path to an element of the struct and a range of possible values, return a copy of a struct whose specified element is within the range. The operation blocks until a struct satisfies the condition is found. Read more
fn try_take_by_range<T, R>(&self, field: &str, range: R) -> Option<T> where
T: Serialize + Deserialize<'de> + 'static,
R: RangeBounds<String> + Clone,
[src]
fn try_take_by_range<T, R>(&self, field: &str, range: R) -> Option<T> where
T: Serialize + Deserialize<'de> + 'static,
R: RangeBounds<String> + Clone,
Given a path to an element of the struct and a range of possible values, remove and return a struct whose specified element is within the range. The operation is non-blocking and will returns None if no struct satisfies condition. Read more
fn take_all_by_range<'a, T, R>(
&'a self,
field: &str,
range: R
) -> Box<Iterator<Item = T> + 'a> where
T: Deserialize<'de> + 'static,
R: RangeBounds<String> + Clone,
[src]
fn take_all_by_range<'a, T, R>(
&'a self,
field: &str,
range: R
) -> Box<Iterator<Item = T> + 'a> where
T: Deserialize<'de> + 'static,
R: RangeBounds<String> + Clone,
Given a path to an element of the struct and a range of possible values, remove and return all structs whose specified element is within the range. Read more
fn take_by_range<T, R>(&self, field: &str, range: R) -> T where
T: Serialize + Deserialize<'de> + 'static,
R: RangeBounds<String> + Clone,
[src]
fn take_by_range<T, R>(&self, field: &str, range: R) -> T where
T: Serialize + Deserialize<'de> + 'static,
R: RangeBounds<String> + Clone,
Given a path to an element of the struct and a range of possible values, remove and return a struct whose specified element is within the range. The operation blocks until a struct satisfies the condition is found. Read more
impl RangeLookupObjectSpace<f64> for TreeObjectSpace
[src]
impl RangeLookupObjectSpace<f64> for TreeObjectSpace
fn try_read_by_range<T, R>(&self, field: &str, range: R) -> Option<T> where
T: Serialize + Deserialize<'de> + 'static,
R: RangeBounds<f64> + Clone,
[src]
fn try_read_by_range<T, R>(&self, field: &str, range: R) -> Option<T> where
T: Serialize + Deserialize<'de> + 'static,
R: RangeBounds<f64> + Clone,
Given a path to an element of the struct and a range of possible values, return a copy of a struct whose specified element is within the range. The operation is non-blocking and will returns None if no struct satisfies condition. Read more
fn read_all_by_range<'a, T, R>(
&'a self,
field: &str,
range: R
) -> Box<Iterator<Item = T> + 'a> where
T: Deserialize<'de> + 'static,
R: RangeBounds<f64> + Clone,
[src]
fn read_all_by_range<'a, T, R>(
&'a self,
field: &str,
range: R
) -> Box<Iterator<Item = T> + 'a> where
T: Deserialize<'de> + 'static,
R: RangeBounds<f64> + Clone,
Given a path to an element of the struct and a range of possible values, return copies of all structs whose specified element is within the range. Read more
fn read_by_range<T, R>(&self, field: &str, range: R) -> T where
T: Serialize + Deserialize<'de> + 'static,
R: RangeBounds<f64> + Clone,
[src]
fn read_by_range<T, R>(&self, field: &str, range: R) -> T where
T: Serialize + Deserialize<'de> + 'static,
R: RangeBounds<f64> + Clone,
Given a path to an element of the struct and a range of possible values, return a copy of a struct whose specified element is within the range. The operation blocks until a struct satisfies the condition is found. Read more
fn try_take_by_range<T, R>(&self, field: &str, range: R) -> Option<T> where
T: Serialize + Deserialize<'de> + 'static,
R: RangeBounds<f64> + Clone,
[src]
fn try_take_by_range<T, R>(&self, field: &str, range: R) -> Option<T> where
T: Serialize + Deserialize<'de> + 'static,
R: RangeBounds<f64> + Clone,
Given a path to an element of the struct and a range of possible values, remove and return a struct whose specified element is within the range. The operation is non-blocking and will returns None if no struct satisfies condition. Read more
fn take_all_by_range<'a, T, R>(
&'a self,
field: &str,
range: R
) -> Box<Iterator<Item = T> + 'a> where
T: Deserialize<'de> + 'static,
R: RangeBounds<f64> + Clone,
[src]
fn take_all_by_range<'a, T, R>(
&'a self,
field: &str,
range: R
) -> Box<Iterator<Item = T> + 'a> where
T: Deserialize<'de> + 'static,
R: RangeBounds<f64> + Clone,
Given a path to an element of the struct and a range of possible values, remove and return all structs whose specified element is within the range. Read more
fn take_by_range<T, R>(&self, field: &str, range: R) -> T where
T: Serialize + Deserialize<'de> + 'static,
R: RangeBounds<f64> + Clone,
[src]
fn take_by_range<T, R>(&self, field: &str, range: R) -> T where
T: Serialize + Deserialize<'de> + 'static,
R: RangeBounds<f64> + Clone,
Given a path to an element of the struct and a range of possible values, remove and return a struct whose specified element is within the range. The operation blocks until a struct satisfies the condition is found. Read more
impl ValueLookupObjectSpace<i64> for TreeObjectSpace
[src]
impl ValueLookupObjectSpace<i64> for TreeObjectSpace
fn try_read_by_value<T>(&self, field: &str, key: &i64) -> Option<T> where
T: Serialize + Deserialize<'de> + 'static,
[src]
fn try_read_by_value<T>(&self, field: &str, key: &i64) -> Option<T> where
T: Serialize + Deserialize<'de> + 'static,
Given a path to an element of the struct and a possible value, return a copy of a struct whose specified element of the specified value. The operation is non-blocking and will returns None if no struct satisfies condition. Read more
fn read_all_by_value<'a, T>(
&'a self,
field: &str,
key: &i64
) -> Box<Iterator<Item = T> + 'a> where
T: Deserialize<'de> + 'static,
[src]
fn read_all_by_value<'a, T>(
&'a self,
field: &str,
key: &i64
) -> Box<Iterator<Item = T> + 'a> where
T: Deserialize<'de> + 'static,
Given a path to an element of the struct and a possible value, return copies of all structs whose specified element of the specified value. Read more
fn read_by_value<T>(&self, field: &str, key: &i64) -> T where
T: Serialize + Deserialize<'de> + 'static,
[src]
fn read_by_value<T>(&self, field: &str, key: &i64) -> T where
T: Serialize + Deserialize<'de> + 'static,
Given a path to an element of the struct and a possible value, return a copy of a struct whose specified element of the specified value. The operation is blocks until an element satisfies the condition is found. Read more
fn try_take_by_value<T>(&self, field: &str, key: &i64) -> Option<T> where
T: Serialize + Deserialize<'de> + 'static,
[src]
fn try_take_by_value<T>(&self, field: &str, key: &i64) -> Option<T> where
T: Serialize + Deserialize<'de> + 'static,
Given a path to an element of the struct and a possible value, remove and return a struct whose specified element of the specified value. The operation is non-blocking and will returns None if no struct satisfies condition. Read more
fn take_all_by_value<'a, T>(
&'a self,
field: &str,
key: &i64
) -> Box<Iterator<Item = T> + 'a> where
T: Deserialize<'de> + 'static,
[src]
fn take_all_by_value<'a, T>(
&'a self,
field: &str,
key: &i64
) -> Box<Iterator<Item = T> + 'a> where
T: Deserialize<'de> + 'static,
Given a path to an element of the struct and a possible value, remove and return all structs whose specified element of the specified value. Read more
fn take_by_value<T>(&self, field: &str, key: &i64) -> T where
T: Serialize + Deserialize<'de> + 'static,
[src]
fn take_by_value<T>(&self, field: &str, key: &i64) -> T where
T: Serialize + Deserialize<'de> + 'static,
Given a path to an element of the struct and a possible value, remove and return a struct whose specified element of the specified value. The operation is blocks until an element satisfies the condition is found. Read more
impl ValueLookupObjectSpace<String> for TreeObjectSpace
[src]
impl ValueLookupObjectSpace<String> for TreeObjectSpace
fn try_read_by_value<T>(&self, field: &str, key: &String) -> Option<T> where
T: Serialize + Deserialize<'de> + 'static,
[src]
fn try_read_by_value<T>(&self, field: &str, key: &String) -> Option<T> where
T: Serialize + Deserialize<'de> + 'static,
Given a path to an element of the struct and a possible value, return a copy of a struct whose specified element of the specified value. The operation is non-blocking and will returns None if no struct satisfies condition. Read more
fn read_all_by_value<'a, T>(
&'a self,
field: &str,
key: &String
) -> Box<Iterator<Item = T> + 'a> where
T: Deserialize<'de> + 'static,
[src]
fn read_all_by_value<'a, T>(
&'a self,
field: &str,
key: &String
) -> Box<Iterator<Item = T> + 'a> where
T: Deserialize<'de> + 'static,
Given a path to an element of the struct and a possible value, return copies of all structs whose specified element of the specified value. Read more
fn read_by_value<T>(&self, field: &str, key: &String) -> T where
T: Serialize + Deserialize<'de> + 'static,
[src]
fn read_by_value<T>(&self, field: &str, key: &String) -> T where
T: Serialize + Deserialize<'de> + 'static,
Given a path to an element of the struct and a possible value, return a copy of a struct whose specified element of the specified value. The operation is blocks until an element satisfies the condition is found. Read more
fn try_take_by_value<T>(&self, field: &str, key: &String) -> Option<T> where
T: Serialize + Deserialize<'de> + 'static,
[src]
fn try_take_by_value<T>(&self, field: &str, key: &String) -> Option<T> where
T: Serialize + Deserialize<'de> + 'static,
Given a path to an element of the struct and a possible value, remove and return a struct whose specified element of the specified value. The operation is non-blocking and will returns None if no struct satisfies condition. Read more
fn take_all_by_value<'a, T>(
&'a self,
field: &str,
key: &String
) -> Box<Iterator<Item = T> + 'a> where
T: Deserialize<'de> + 'static,
[src]
fn take_all_by_value<'a, T>(
&'a self,
field: &str,
key: &String
) -> Box<Iterator<Item = T> + 'a> where
T: Deserialize<'de> + 'static,
Given a path to an element of the struct and a possible value, remove and return all structs whose specified element of the specified value. Read more
fn take_by_value<T>(&self, field: &str, key: &String) -> T where
T: Serialize + Deserialize<'de> + 'static,
[src]
fn take_by_value<T>(&self, field: &str, key: &String) -> T where
T: Serialize + Deserialize<'de> + 'static,
Given a path to an element of the struct and a possible value, remove and return a struct whose specified element of the specified value. The operation is blocks until an element satisfies the condition is found. Read more
impl ValueLookupObjectSpace<bool> for TreeObjectSpace
[src]
impl ValueLookupObjectSpace<bool> for TreeObjectSpace
fn try_read_by_value<T>(&self, field: &str, key: &bool) -> Option<T> where
T: Serialize + Deserialize<'de> + 'static,
[src]
fn try_read_by_value<T>(&self, field: &str, key: &bool) -> Option<T> where
T: Serialize + Deserialize<'de> + 'static,
Given a path to an element of the struct and a possible value, return a copy of a struct whose specified element of the specified value. The operation is non-blocking and will returns None if no struct satisfies condition. Read more
fn read_all_by_value<'a, T>(
&'a self,
field: &str,
key: &bool
) -> Box<Iterator<Item = T> + 'a> where
T: Deserialize<'de> + 'static,
[src]
fn read_all_by_value<'a, T>(
&'a self,
field: &str,
key: &bool
) -> Box<Iterator<Item = T> + 'a> where
T: Deserialize<'de> + 'static,
Given a path to an element of the struct and a possible value, return copies of all structs whose specified element of the specified value. Read more
fn read_by_value<T>(&self, field: &str, key: &bool) -> T where
T: Serialize + Deserialize<'de> + 'static,
[src]
fn read_by_value<T>(&self, field: &str, key: &bool) -> T where
T: Serialize + Deserialize<'de> + 'static,
Given a path to an element of the struct and a possible value, return a copy of a struct whose specified element of the specified value. The operation is blocks until an element satisfies the condition is found. Read more
fn try_take_by_value<T>(&self, field: &str, key: &bool) -> Option<T> where
T: Serialize + Deserialize<'de> + 'static,
[src]
fn try_take_by_value<T>(&self, field: &str, key: &bool) -> Option<T> where
T: Serialize + Deserialize<'de> + 'static,
Given a path to an element of the struct and a possible value, remove and return a struct whose specified element of the specified value. The operation is non-blocking and will returns None if no struct satisfies condition. Read more
fn take_all_by_value<'a, T>(
&'a self,
field: &str,
key: &bool
) -> Box<Iterator<Item = T> + 'a> where
T: Deserialize<'de> + 'static,
[src]
fn take_all_by_value<'a, T>(
&'a self,
field: &str,
key: &bool
) -> Box<Iterator<Item = T> + 'a> where
T: Deserialize<'de> + 'static,
Given a path to an element of the struct and a possible value, remove and return all structs whose specified element of the specified value. Read more
fn take_by_value<T>(&self, field: &str, key: &bool) -> T where
T: Serialize + Deserialize<'de> + 'static,
[src]
fn take_by_value<T>(&self, field: &str, key: &bool) -> T where
T: Serialize + Deserialize<'de> + 'static,
Given a path to an element of the struct and a possible value, remove and return a struct whose specified element of the specified value. The operation is blocks until an element satisfies the condition is found. Read more
impl ValueLookupObjectSpace<f64> for TreeObjectSpace
[src]
impl ValueLookupObjectSpace<f64> for TreeObjectSpace
fn try_read_by_value<T>(&self, field: &str, key: &f64) -> Option<T> where
T: Serialize + Deserialize<'de> + 'static,
[src]
fn try_read_by_value<T>(&self, field: &str, key: &f64) -> Option<T> where
T: Serialize + Deserialize<'de> + 'static,
Given a path to an element of the struct and a possible value, return a copy of a struct whose specified element of the specified value. The operation is non-blocking and will returns None if no struct satisfies condition. Read more
fn read_all_by_value<'a, T>(
&'a self,
field: &str,
key: &f64
) -> Box<Iterator<Item = T> + 'a> where
T: Deserialize<'de> + 'static,
[src]
fn read_all_by_value<'a, T>(
&'a self,
field: &str,
key: &f64
) -> Box<Iterator<Item = T> + 'a> where
T: Deserialize<'de> + 'static,
Given a path to an element of the struct and a possible value, return copies of all structs whose specified element of the specified value. Read more
fn read_by_value<T>(&self, field: &str, key: &f64) -> T where
T: Serialize + Deserialize<'de> + 'static,
[src]
fn read_by_value<T>(&self, field: &str, key: &f64) -> T where
T: Serialize + Deserialize<'de> + 'static,
Given a path to an element of the struct and a possible value, return a copy of a struct whose specified element of the specified value. The operation is blocks until an element satisfies the condition is found. Read more
fn try_take_by_value<T>(&self, field: &str, key: &f64) -> Option<T> where
T: Serialize + Deserialize<'de> + 'static,
[src]
fn try_take_by_value<T>(&self, field: &str, key: &f64) -> Option<T> where
T: Serialize + Deserialize<'de> + 'static,
Given a path to an element of the struct and a possible value, remove and return a struct whose specified element of the specified value. The operation is non-blocking and will returns None if no struct satisfies condition. Read more
fn take_all_by_value<'a, T>(
&'a self,
field: &str,
key: &f64
) -> Box<Iterator<Item = T> + 'a> where
T: Deserialize<'de> + 'static,
[src]
fn take_all_by_value<'a, T>(
&'a self,
field: &str,
key: &f64
) -> Box<Iterator<Item = T> + 'a> where
T: Deserialize<'de> + 'static,
Given a path to an element of the struct and a possible value, remove and return all structs whose specified element of the specified value. Read more
fn take_by_value<T>(&self, field: &str, key: &f64) -> T where
T: Serialize + Deserialize<'de> + 'static,
[src]
fn take_by_value<T>(&self, field: &str, key: &f64) -> T where
T: Serialize + Deserialize<'de> + 'static,
Given a path to an element of the struct and a possible value, remove and return a struct whose specified element of the specified value. The operation is blocks until an element satisfies the condition is found. Read more
Auto Trait Implementations
impl Send for TreeObjectSpace
impl Send for TreeObjectSpace
impl Sync for TreeObjectSpace
impl Sync for TreeObjectSpace