TeloidStore

Struct TeloidStore 

Source
pub struct TeloidStore<D, S, T, ST, SYM, VS, VT>
where D: Datable + Clone, S: Spatial<VS> + Clone, T: Temporal<VT> + Clone, ST: SpaceTemporal<VS, VT> + Clone, SYM: Symbolic + Clone, VS: Clone, VT: Clone,
{ /* private fields */ }
Expand description

A generic, in-memory storage for Teloids, indexed by their unique ID.

Implementations§

Source§

impl<D, S, T, ST, SYM, VS, VT> TeloidStore<D, S, T, ST, SYM, VS, VT>
where D: Datable + Clone, S: Spatial<VS> + Clone, T: Temporal<VT> + Clone, ST: SpaceTemporal<VS, VT> + Clone, SYM: Symbolic + Clone, VS: Clone, VT: Clone,

Source

pub fn new() -> Self

Creates a new, empty TeloidStore.

§Returns

A new TeloidStore instance.

Source

pub fn with_capacity(capacity: usize) -> Self

Creates a new TeloidStore with a specified capacity.

§Arguments
  • capacity - The initial capacity of the store.
§Returns

A new TeloidStore instance with the given capacity.

Trait Implementations§

Source§

impl<D, S, T, ST, SYM, VS, VT> Clone for TeloidStore<D, S, T, ST, SYM, VS, VT>
where D: Datable + Clone + Clone, S: Spatial<VS> + Clone + Clone, T: Temporal<VT> + Clone + Clone, ST: SpaceTemporal<VS, VT> + Clone + Clone, SYM: Symbolic + Clone + Clone, VS: Clone + Clone, VT: Clone + Clone,

Source§

fn clone(&self) -> TeloidStore<D, S, T, ST, SYM, VS, VT>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<D, S, T, ST, SYM, VS, VT> Debug for TeloidStore<D, S, T, ST, SYM, VS, VT>
where D: Datable + Clone + Debug, S: Spatial<VS> + Clone + Debug, T: Temporal<VT> + Clone + Debug, ST: SpaceTemporal<VS, VT> + Clone + Debug, SYM: Symbolic + Clone + Debug, VS: Clone + Debug, VT: Clone + Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<D, S, T, ST, SYM, VS, VT> Default for TeloidStore<D, S, T, ST, SYM, VS, VT>
where D: Datable + Clone + Default, S: Spatial<VS> + Clone + Default, T: Temporal<VT> + Clone + Default, ST: SpaceTemporal<VS, VT> + Clone + Default, SYM: Symbolic + Clone + Default, VS: Clone + Default, VT: Clone + Default,

Source§

fn default() -> TeloidStore<D, S, T, ST, SYM, VS, VT>

Returns the “default value” for a type. Read more
Source§

impl<D, S, T, ST, SYM, VS, VT> TeloidStorable<D, S, T, ST, SYM, VS, VT> for TeloidStore<D, S, T, ST, SYM, VS, VT>
where D: Datable + Clone, S: Spatial<VS> + Clone, T: Temporal<VT> + Clone, ST: SpaceTemporal<VS, VT> + Clone, SYM: Symbolic + Clone, VS: Clone, VT: Clone,

Source§

fn insert( &mut self, teloid: Teloid<D, S, T, ST, SYM, VS, VT>, ) -> Option<Teloid<D, S, T, ST, SYM, VS, VT>>

Inserts a Teloid into the store.

If the store did not have this ID present, None is returned. If the store did have this ID present, the value is updated, and the old value is returned.

§Arguments
  • teloid - The Teloid to insert.
§Returns

An Option containing the old Teloid if the ID already existed, otherwise None.

Source§

fn get(&self, id: &TeloidID) -> Option<&Teloid<D, S, T, ST, SYM, VS, VT>>

Retrieves a reference to a Teloid from the store.

§Arguments
  • id - The TeloidID of the Teloid to retrieve.
§Returns

An Option containing a reference to the Teloid if it exists, otherwise None.

Source§

fn remove(&mut self, id: &TeloidID) -> Option<Teloid<D, S, T, ST, SYM, VS, VT>>

Removes a Teloid from the store, returning it.

§Arguments
  • id - The TeloidID of the Teloid to remove.
§Returns

An Option containing the removed Teloid if it existed, otherwise None.

Source§

fn update( &mut self, teloid: Teloid<D, S, T, ST, SYM, VS, VT>, ) -> Option<Teloid<D, S, T, ST, SYM, VS, VT>>

Updates a Teloid in the store. This is an alias for insert.

If the store did not have this ID present, None is returned. If the store did have this ID present, the value is updated, and the old value is returned.

§Arguments
  • teloid - The Teloid to insert/update.
§Returns

An Option containing the old Teloid if the ID already existed, otherwise None.

Source§

fn contains_key(&self, id: &TeloidID) -> bool

Checks if the store contains a Teloid with the specified ID.

§Arguments
  • id - The TeloidID to check for.
§Returns

true if the store contains the ID, otherwise false.

Source§

fn len(&self) -> usize

Returns the number of Teloids in the store.

§Returns

The number of Teloids in the store.

Source§

fn is_empty(&self) -> bool

Returns true if the store contains no Teloids.

§Returns

true if the store is empty, otherwise false.

Source§

fn clear(&mut self)

Clears the store, removing all Teloids.

Auto Trait Implementations§

§

impl<D, S, T, ST, SYM, VS, VT> Freeze for TeloidStore<D, S, T, ST, SYM, VS, VT>

§

impl<D, S, T, ST, SYM, VS, VT> RefUnwindSafe for TeloidStore<D, S, T, ST, SYM, VS, VT>

§

impl<D, S, T, ST, SYM, VS, VT> Send for TeloidStore<D, S, T, ST, SYM, VS, VT>

§

impl<D, S, T, ST, SYM, VS, VT> Sync for TeloidStore<D, S, T, ST, SYM, VS, VT>

§

impl<D, S, T, ST, SYM, VS, VT> Unpin for TeloidStore<D, S, T, ST, SYM, VS, VT>

§

impl<D, S, T, ST, SYM, VS, VT> UnwindSafe for TeloidStore<D, S, T, ST, SYM, VS, VT>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.