pub enum BuildItem<'a, T>where
T: Storable,{
Id(String),
IdRef(&'a str),
Ref(&'a T),
Handle(T::HandleType),
None,
}Expand description
BuildItem offers various ways of referring to a data structure of type T in the core STAM model
It abstracts over public IDs (both owned an and borrowed), handles, and references.
Variants§
Implementations§
source§impl<'a, T> BuildItem<'a, T>where
T: Storable,
impl<'a, T> BuildItem<'a, T>where
T: Storable,
Trait Implementations§
source§impl<'de: 'a, 'a, T> Deserialize<'de> for BuildItem<'a, T>where
T: Storable,
impl<'de: 'a, 'a, T> Deserialize<'de> for BuildItem<'a, T>where
T: Storable,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<&AnnotationDataHandle> for BuildItem<'_, AnnotationData>
impl From<&AnnotationDataHandle> for BuildItem<'_, AnnotationData>
source§fn from(handle: &AnnotationDataHandle) -> Self
fn from(handle: &AnnotationDataHandle) -> Self
Converts to this type from the input type.
source§impl From<&AnnotationDataSetHandle> for BuildItem<'_, AnnotationDataSet>
impl From<&AnnotationDataSetHandle> for BuildItem<'_, AnnotationDataSet>
source§fn from(handle: &AnnotationDataSetHandle) -> Self
fn from(handle: &AnnotationDataSetHandle) -> Self
Converts to this type from the input type.
source§impl<'a> From<&AnnotationHandle> for BuildItem<'a, Annotation>
impl<'a> From<&AnnotationHandle> for BuildItem<'a, Annotation>
source§fn from(handle: &AnnotationHandle) -> Self
fn from(handle: &AnnotationHandle) -> Self
Converts to this type from the input type.
source§impl<'a> From<&DataKeyHandle> for BuildItem<'a, DataKey>
impl<'a> From<&DataKeyHandle> for BuildItem<'a, DataKey>
source§fn from(handle: &DataKeyHandle) -> Self
fn from(handle: &DataKeyHandle) -> Self
Converts to this type from the input type.
source§impl<'a, T> From<&ResultItem<'a, T>> for BuildItem<'a, T>where
T: Storable,
impl<'a, T> From<&ResultItem<'a, T>> for BuildItem<'a, T>where
T: Storable,
source§fn from(result: &ResultItem<'a, T>) -> Self
fn from(result: &ResultItem<'a, T>) -> Self
Converts to this type from the input type.
source§impl<'a> From<&TextResourceHandle> for BuildItem<'a, TextResource>
impl<'a> From<&TextResourceHandle> for BuildItem<'a, TextResource>
source§fn from(handle: &TextResourceHandle) -> Self
fn from(handle: &TextResourceHandle) -> Self
Converts to this type from the input type.
source§impl<'a> From<&TextSelectionHandle> for BuildItem<'a, TextSelection>
impl<'a> From<&TextSelectionHandle> for BuildItem<'a, TextSelection>
source§fn from(handle: &TextSelectionHandle) -> Self
fn from(handle: &TextSelectionHandle) -> Self
Converts to this type from the input type.
source§impl From<AnnotationDataHandle> for BuildItem<'_, AnnotationData>
impl From<AnnotationDataHandle> for BuildItem<'_, AnnotationData>
source§fn from(handle: AnnotationDataHandle) -> Self
fn from(handle: AnnotationDataHandle) -> Self
Converts to this type from the input type.
source§impl From<AnnotationDataSetHandle> for BuildItem<'_, AnnotationDataSet>
impl From<AnnotationDataSetHandle> for BuildItem<'_, AnnotationDataSet>
source§fn from(handle: AnnotationDataSetHandle) -> Self
fn from(handle: AnnotationDataSetHandle) -> Self
Converts to this type from the input type.
source§impl<'a> From<AnnotationHandle> for BuildItem<'a, Annotation>
impl<'a> From<AnnotationHandle> for BuildItem<'a, Annotation>
source§fn from(handle: AnnotationHandle) -> Self
fn from(handle: AnnotationHandle) -> Self
Converts to this type from the input type.
source§impl<'a> From<DataKeyHandle> for BuildItem<'a, DataKey>
impl<'a> From<DataKeyHandle> for BuildItem<'a, DataKey>
source§fn from(handle: DataKeyHandle) -> Self
fn from(handle: DataKeyHandle) -> Self
Converts to this type from the input type.
source§impl<'a> From<Option<&AnnotationHandle>> for BuildItem<'a, Annotation>
impl<'a> From<Option<&AnnotationHandle>> for BuildItem<'a, Annotation>
source§fn from(handle: Option<&AnnotationHandle>) -> Self
fn from(handle: Option<&AnnotationHandle>) -> Self
Converts to this type from the input type.
source§impl<'a> From<Option<&DataKeyHandle>> for BuildItem<'a, DataKey>
impl<'a> From<Option<&DataKeyHandle>> for BuildItem<'a, DataKey>
source§fn from(handle: Option<&DataKeyHandle>) -> Self
fn from(handle: Option<&DataKeyHandle>) -> Self
Converts to this type from the input type.
source§impl<'a> From<Option<&TextResourceHandle>> for BuildItem<'a, TextResource>
impl<'a> From<Option<&TextResourceHandle>> for BuildItem<'a, TextResource>
source§fn from(handle: Option<&TextResourceHandle>) -> Self
fn from(handle: Option<&TextResourceHandle>) -> Self
Converts to this type from the input type.
source§impl<'a> From<Option<&TextSelectionHandle>> for BuildItem<'a, TextSelection>
impl<'a> From<Option<&TextSelectionHandle>> for BuildItem<'a, TextSelection>
source§fn from(handle: Option<&TextSelectionHandle>) -> Self
fn from(handle: Option<&TextSelectionHandle>) -> Self
Converts to this type from the input type.
source§impl<'a> From<Option<AnnotationHandle>> for BuildItem<'a, Annotation>
impl<'a> From<Option<AnnotationHandle>> for BuildItem<'a, Annotation>
source§fn from(handle: Option<AnnotationHandle>) -> Self
fn from(handle: Option<AnnotationHandle>) -> Self
Converts to this type from the input type.
source§impl<'a> From<Option<DataKeyHandle>> for BuildItem<'a, DataKey>
impl<'a> From<Option<DataKeyHandle>> for BuildItem<'a, DataKey>
source§fn from(handle: Option<DataKeyHandle>) -> Self
fn from(handle: Option<DataKeyHandle>) -> Self
Converts to this type from the input type.
source§impl<'a> From<Option<TextResourceHandle>> for BuildItem<'a, TextResource>
impl<'a> From<Option<TextResourceHandle>> for BuildItem<'a, TextResource>
source§fn from(handle: Option<TextResourceHandle>) -> Self
fn from(handle: Option<TextResourceHandle>) -> Self
Converts to this type from the input type.
source§impl<'a> From<Option<TextSelectionHandle>> for BuildItem<'a, TextSelection>
impl<'a> From<Option<TextSelectionHandle>> for BuildItem<'a, TextSelection>
source§fn from(handle: Option<TextSelectionHandle>) -> Self
fn from(handle: Option<TextSelectionHandle>) -> Self
Converts to this type from the input type.
source§impl<'a> From<TextResourceHandle> for BuildItem<'a, TextResource>
impl<'a> From<TextResourceHandle> for BuildItem<'a, TextResource>
source§fn from(handle: TextResourceHandle) -> Self
fn from(handle: TextResourceHandle) -> Self
Converts to this type from the input type.
source§impl<'a> From<TextSelectionHandle> for BuildItem<'a, TextSelection>
impl<'a> From<TextSelectionHandle> for BuildItem<'a, TextSelection>
source§fn from(handle: TextSelectionHandle) -> Self
fn from(handle: TextSelectionHandle) -> Self
Converts to this type from the input type.
source§impl<'a, T> PartialEq<&str> for BuildItem<'a, T>where
T: Storable,
impl<'a, T> PartialEq<&str> for BuildItem<'a, T>where
T: Storable,
source§impl<'a, T> PartialEq<String> for BuildItem<'a, T>where
T: Storable,
impl<'a, T> PartialEq<String> for BuildItem<'a, T>where
T: Storable,
source§impl<'a, T> PartialEq for BuildItem<'a, T>where
T: Storable,
impl<'a, T> PartialEq for BuildItem<'a, T>where
T: Storable,
source§impl<'a, T> Request<T> for &BuildItem<'a, T>where
T: Storable,
impl<'a, T> Request<T> for &BuildItem<'a, T>where
T: Storable,
source§fn to_handle<'store, S>(&self, store: &'store S) -> Option<T::HandleType>where
S: StoreFor<T>,
fn to_handle<'store, S>(&self, store: &'store S) -> Option<T::HandleType>where
S: StoreFor<T>,
Returns the handle for this item, looking it up in the store
source§fn requested_id(&self) -> Option<&str>
fn requested_id(&self) -> Option<&str>
If this type encapsulates an Id, this returns it (borrowed)
source§fn requested_id_owned(self) -> Option<String>
fn requested_id_owned(self) -> Option<String>
If this type encapsulates an Id, this returns it (oened)
source§fn requested_handle(&self) -> Option<T::HandleType>
fn requested_handle(&self) -> Option<T::HandleType>
If this type encapsulates a handle, this returns it
source§impl<'a, T> Request<T> for BuildItem<'a, T>where
T: Storable,
impl<'a, T> Request<T> for BuildItem<'a, T>where
T: Storable,
source§fn to_handle<'store, S>(&self, store: &'store S) -> Option<T::HandleType>where
S: StoreFor<T>,
fn to_handle<'store, S>(&self, store: &'store S) -> Option<T::HandleType>where
S: StoreFor<T>,
Returns the handle for this item, looking it up in the store
source§fn requested_id(&self) -> Option<&str>
fn requested_id(&self) -> Option<&str>
If this type encapsulates an Id, this returns it (borrowed)
source§fn requested_id_owned(self) -> Option<String>
fn requested_id_owned(self) -> Option<String>
If this type encapsulates an Id, this returns it (oened)
source§fn requested_handle(&self) -> Option<T::HandleType>
fn requested_handle(&self) -> Option<T::HandleType>
If this type encapsulates a handle, this returns it
Auto Trait Implementations§
impl<'a, T> RefUnwindSafe for BuildItem<'a, T>
impl<'a, T> Send for BuildItem<'a, T>
impl<'a, T> Sync for BuildItem<'a, T>
impl<'a, T> Unpin for BuildItem<'a, T>
impl<'a, T> UnwindSafe for BuildItem<'a, T>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more