pub struct PropMapper { /* private fields */ }Expand description
Manages the mapping of property names to their IDs and types.
Implementations§
Source§impl PropMapper
impl PropMapper
pub fn new_with_private_fields( fields: impl IntoIterator<Item = impl Into<ArcStr>>, dtypes: impl IntoIterator<Item = PropType>, ) -> Self
pub fn d_types(&self) -> impl Deref<Target = Vec<PropType>> + '_
pub fn deep_clone(&self) -> Self
pub fn row_size(&self) -> usize
pub fn get_id_and_dtype(&self, prop: &str) -> Option<(usize, PropType)>
pub fn get_or_create_and_validate( &self, prop: &str, dtype: PropType, ) -> Result<MaybeNew<usize>, PropError>
pub fn set_id_and_dtype( &self, key: impl Into<ArcStr>, id: usize, dtype: PropType, )
pub fn set_dtype(&self, id: usize, dtype: PropType)
pub fn get_dtype(&self, prop_id: usize) -> Option<PropType>
pub fn locked(&self) -> LockedPropMapper<'_>
pub fn write_locked(&self) -> WriteLockedPropMapper<'_>
Methods from Deref<Target = DictMapper>§
pub fn contains(&self, key: &str) -> bool
pub fn deep_clone(&self) -> Self
pub fn read(&self) -> LockedDictMapper<'_>
pub fn write(&self) -> WriteLockedDictMapper<'_>
pub fn get_or_create_id<Q, T>(&self, name: &Q) -> MaybeNew<usize>
pub fn get_id(&self, name: &str) -> Option<usize>
Sourcepub fn set_id(&self, name: impl Into<ArcStr>, id: usize)
pub fn set_id(&self, name: impl Into<ArcStr>, id: usize)
Explicitly set the id for a key (useful for initialising the map in parallel)
pub fn has_id(&self, id: usize) -> bool
pub fn get_name(&self, id: usize) -> ArcStr
Sourcepub fn keys(&self) -> PublicKeys<ArcStr>
pub fn keys(&self) -> PublicKeys<ArcStr>
Public keys
pub fn num_all_fields(&self) -> usize
pub fn num_fields(&self) -> usize
pub fn num_private_fields(&self) -> usize
Trait Implementations§
Source§impl Debug for PropMapper
impl Debug for PropMapper
Source§impl Default for PropMapper
impl Default for PropMapper
Source§fn default() -> PropMapper
fn default() -> PropMapper
Returns the “default value” for a type. Read more
Source§impl Deref for PropMapper
impl Deref for PropMapper
Source§impl<'de> Deserialize<'de> for PropMapper
impl<'de> Deserialize<'de> for PropMapper
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
Auto Trait Implementations§
impl !Freeze for PropMapper
impl !RefUnwindSafe for PropMapper
impl !UnwindSafe for PropMapper
impl Send for PropMapper
impl Sync for PropMapper
impl Unpin for PropMapper
impl UnsafeUnpin for PropMapper
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more