Struct stepflow_base::ObjectStore [−][src]
Implementations
impl<T, TID> ObjectStore<T, TID> where
T: ObjectStoreContent + ObjectStoreContent<IdType = TID>,
TID: Eq + Hash + Clone,
[src]
T: ObjectStoreContent + ObjectStoreContent<IdType = TID>,
TID: Eq + Hash + Clone,
pub fn new() -> Self
[src]
pub fn with_capacity(capacity: usize) -> Self
[src]
pub fn reserve_id(&mut self) -> TID
[src]
pub fn insert_new<CB>(
&mut self,
name: Option<String>,
cb: CB
) -> Result<TID, IdError<TID>> where
CB: FnOnce(TID) -> Result<T, IdError<TID>>,
[src]
&mut self,
name: Option<String>,
cb: CB
) -> Result<TID, IdError<TID>> where
CB: FnOnce(TID) -> Result<T, IdError<TID>>,
pub fn register(
&mut self,
name: Option<String>,
object: T
) -> Result<TID, IdError<TID>>
[src]
&mut self,
name: Option<String>,
object: T
) -> Result<TID, IdError<TID>>
pub fn id_from_name(&self, name: &str) -> Option<&TID>
[src]
pub fn name_from_id(&self, id: &TID) -> Option<&String>
[src]
pub fn get_by_name(&self, name: &str) -> Option<&T>
[src]
pub fn get(&self, id: &TID) -> Option<&T>
[src]
pub fn get_mut(&mut self, id: &TID) -> Option<&mut T>
[src]
pub fn iter_names(&self) -> impl Iterator<Item = (&String, &TID)>
[src]
Trait Implementations
Auto Trait Implementations
impl<T, TID> RefUnwindSafe for ObjectStore<T, TID> where
T: RefUnwindSafe,
TID: RefUnwindSafe,
[src]
T: RefUnwindSafe,
TID: RefUnwindSafe,
impl<T, TID> Send for ObjectStore<T, TID> where
T: Send,
TID: Send,
[src]
T: Send,
TID: Send,
impl<T, TID> Sync for ObjectStore<T, TID> where
T: Sync,
TID: Sync,
[src]
T: Sync,
TID: Sync,
impl<T, TID> Unpin for ObjectStore<T, TID> where
T: Unpin,
TID: Unpin,
[src]
T: Unpin,
TID: Unpin,
impl<T, TID> UnwindSafe for ObjectStore<T, TID> where
T: UnwindSafe,
TID: UnwindSafe,
[src]
T: UnwindSafe,
TID: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> AsAny for T where
T: Any,
[src]
T: Any,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub 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.
pub 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>,