pub struct PropertyMapping { /* private fields */ }
Expand description
A property mapping maps human-readable property and attribute labels to ObjIds.
Implementations§
Source§impl PropertyMapping
impl PropertyMapping
Sourcepub fn add(
&mut self,
property_label: String,
attribute_label: String,
attribute_id: ObjId,
)
pub fn add( &mut self, property_label: String, attribute_label: String, attribute_id: ObjId, )
Add an property/attribute/attribute-id triple to the mapping.
Sourcepub fn attribute_object_id(
&self,
property_label: &str,
attribute_label: &str,
) -> Option<ObjId>
pub fn attribute_object_id( &self, property_label: &str, attribute_label: &str, ) -> Option<ObjId>
Get the object ID of a single property/attribute label pair, if found.
Sourcepub fn translate<'a>(
&self,
attributes: impl IntoIterator<Item = (&'a str, &'a str)>,
) -> FnvHashSet<AnyId>
pub fn translate<'a>( &self, attributes: impl IntoIterator<Item = (&'a str, &'a str)>, ) -> FnvHashSet<AnyId>
Translate the given property/attribute labels to underlying ObjIds.
Trait Implementations§
Source§impl Clone for PropertyMapping
impl Clone for PropertyMapping
Source§fn clone(&self) -> PropertyMapping
fn clone(&self) -> PropertyMapping
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Default for PropertyMapping
impl Default for PropertyMapping
Source§fn default() -> PropertyMapping
fn default() -> PropertyMapping
Returns the “default value” for a type. Read more
Source§impl<'a> IntoIterator for &'a PropertyMapping
impl<'a> IntoIterator for &'a PropertyMapping
Source§impl IntoIterator for PropertyMapping
impl IntoIterator for PropertyMapping
Auto Trait Implementations§
impl Freeze for PropertyMapping
impl RefUnwindSafe for PropertyMapping
impl Send for PropertyMapping
impl Sync for PropertyMapping
impl Unpin for PropertyMapping
impl UnwindSafe for PropertyMapping
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request