[−][src]Trait folia::store::Storable
This trait needs to be implemented on items that are storable in a Store
. It is a very lax trait where storable elements MAY BE identifiable and MAY BE storing their own key (the default implementation does neither)
Provided methods
fn maybe_id(&self) -> Option<Cow<str>>
Returns the ID if any. Returns a Cow
fn encodable(&self) -> bool
fn key(&self) -> Option<Key>
Get the key of the current item (if supported by the item)
fn assign_key(&mut self, key: Key)
Set the key of the current item (if supported by the item)
Implementors
impl Storable<u16> for Declaration
[src]
fn maybe_id(&self) -> Option<Cow<str>>
[src]
fn key(&self) -> Option<DecKey>
[src]
Returns the key of the current element
fn assign_key(&mut self, key: DecKey)
[src]
Sets the key of the current element
impl Storable<u16> for Processor
[src]
fn key(&self) -> Option<ProcKey>
[src]
Returns the key of the current processor
fn assign_key(&mut self, key: ProcKey)
[src]
Sets the key of the current processor
fn maybe_id(&self) -> Option<Cow<str>>
[src]
impl Storable<u32> for ElementData
[src]
fn maybe_id(&self) -> Option<Cow<str>>
[src]
fn encodable(&self) -> bool
[src]
Returns true
if this element is encodable, i.e. if it needs to be encoded
prior to being stored. An element is encodable if it has one or more encodable elements.
fn key(&self) -> Option<ElementKey>
[src]
Returns the key of the current element
fn assign_key(&mut self, key: ElementKey)
[src]
Sets the key of the current element