Struct Categories
pub struct Categories { /* private fields */ }
Expand description
A (named) object which is used to indicate which categorical data types have the same mapping.
Implementations§
§impl Categories
impl Categories
pub 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.
pub fn global() -> Arc<Categories>
pub fn global() -> Arc<Categories>
Returns the global Categories.
pub fn is_global(self: &Arc<Categories>) -> bool
pub fn is_global(self: &Arc<Categories>) -> bool
Returns whether this refers to the global categories.
pub 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.
pub fn name(&self) -> &PlSmallStr
pub fn name(&self) -> &PlSmallStr
The name of this Categories object.
pub fn namespace(&self) -> &PlSmallStr
pub fn namespace(&self) -> &PlSmallStr
The namespace of this Categories object.
pub fn physical(&self) -> CategoricalPhysical
pub fn physical(&self) -> CategoricalPhysical
The physical dtype of the category ids.
pub 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§
§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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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