pub struct Categories { /* private fields */ }
Expand description
A (named) object which is used to indicate which categorical data types have the same mapping. The underlying mapping is dynamic, and if gc is true may be automatically cleared when the last reference to it goes away.
Implementations§
Source§impl Categories
impl Categories
Sourcepub fn new(
name: PlSmallStr,
physical: CategoricalPhysical,
gc: bool,
) -> Arc<Categories>
pub fn new( name: PlSmallStr, physical: CategoricalPhysical, gc: bool, ) -> Arc<Categories>
Creates a new Categories object with the given name and physical type.
If gc is true the underlying categories will automatically get cleaned up when the last CategoricalMapping reference goes away, otherwise they are persistent.
Sourcepub fn from_uuid(
name: PlSmallStr,
physical: CategoricalPhysical,
gc: bool,
uuid: Uuid,
) -> Arc<Categories>
pub fn from_uuid( name: PlSmallStr, physical: CategoricalPhysical, gc: bool, uuid: Uuid, ) -> Arc<Categories>
Returns the Categories object with the given UUID. If the UUID is unknown a new one is created.
Sourcepub fn global() -> Arc<Categories>
pub fn global() -> Arc<Categories>
Returns the global Categories.
Sourcepub fn name(&self) -> &PlSmallStr
pub fn name(&self) -> &PlSmallStr
The name of this Categories object (not unique).
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, physical: CategoricalPhysical) -> Arc<FrozenCategories>
Trait Implementations§
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