pub struct Categories { /* private fields */ }
Expand description
A (named) object which is used to indicate which categorical data types have the same mapping.
Implementations§
Source§impl Categories
impl Categories
Sourcepub fn new(
name: PlSmallStr,
namespace: PlSmallStr,
physical: CategoricalPhysical,
) -> Arc<Categories>
pub fn new( name: PlSmallStr, namespace: PlSmallStr, physical: CategoricalPhysical, ) -> Arc<Categories>
Creates a new Categories object with the given name, namespace and physical type if none exists, otherwise get a reference to an existing object with the same name, namespace and physical type.
Sourcepub fn global() -> Arc<Categories>
pub fn global() -> Arc<Categories>
Returns the global Categories.
Sourcepub fn is_global(self: &Arc<Categories>) -> bool
pub fn is_global(self: &Arc<Categories>) -> bool
Returns whether this refers to the global categories.
Sourcepub fn random(
namespace: PlSmallStr,
physical: CategoricalPhysical,
) -> Arc<Categories>
pub fn random( namespace: PlSmallStr, physical: CategoricalPhysical, ) -> Arc<Categories>
Generates a Categories with a random (UUID) name.
Sourcepub fn name(&self) -> &PlSmallStr
pub fn name(&self) -> &PlSmallStr
The name of this Categories object.
Sourcepub fn namespace(&self) -> &PlSmallStr
pub fn namespace(&self) -> &PlSmallStr
The namespace of this Categories object.
Sourcepub fn physical(&self) -> CategoricalPhysical
pub fn physical(&self) -> CategoricalPhysical
The physical dtype of the category ids.
Sourcepub fn hash(&self) -> u64
pub fn hash(&self) -> u64
A stable hash of this Categories object, not the contained categories.
Sourcepub fn mapping(&self) -> Arc<CategoricalMapping>
pub fn mapping(&self) -> Arc<CategoricalMapping>
The mapping for this Categories object. If no mapping currently exists it creates a new empty mapping.
pub fn freeze(&self) -> Arc<FrozenCategories>
Trait Implementations§
Source§impl Debug for Categories
impl Debug for Categories
Auto Trait Implementations§
impl !Freeze for Categories
impl RefUnwindSafe for Categories
impl Send for Categories
impl Sync for Categories
impl Unpin for Categories
impl UnwindSafe for Categories
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
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