[−][src]Struct repository::Repo
A special kind of arena that can support storing multiple data types.
See the module documentation for more details.
Implementations
impl Repo
[src]
pub fn transaction_preallocate<TxFn, T, E>(
&mut self,
transaction: TxFn
) -> Result<T, E> where
TxFn: FnOnce(&mut PreallocTx<'_>) -> Result<T, E>,
[src]
&mut self,
transaction: TxFn
) -> Result<T, E> where
TxFn: FnOnce(&mut PreallocTx<'_>) -> Result<T, E>,
Executes a transaction with preallocation support
See the documentation of PreallocTx
for more information.
impl Repo
[src]
pub fn new() -> Self
[src]
Create a new Repo
.
pub fn insert<T: Any>(&mut self, v: T) -> EntityPtr<T>
[src]
Add a new value into the repository. Returning a pointer handle to this value.
pub fn insert_for_id<T: Any>(&mut self, v: T) -> EntityId
[src]
Add a new value into the repository. Returning an index handle to this value.
pub fn remove<T: Any>(&mut self, entity_ptr: EntityPtr<T>) -> Option<T>
[src]
Remove a value from the repository with its pointer handle.
Trait Implementations
impl AsRepoMut for Repo
[src]
fn as_repo_mut(&mut self) -> &mut Repo
[src]
impl AsRepoRef for Repo
[src]
fn as_repo_ref(&self) -> &Repo
[src]
impl Debug for Repo
[src]
impl Default for Repo
[src]
Auto Trait Implementations
impl !RefUnwindSafe for Repo
impl !Send for Repo
impl !Sync for Repo
impl Unpin for Repo
impl UnwindSafe for Repo
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,