pub struct FormatRegistry { /* private fields */ }Expand description
Workbook-local registry of classified number-format codes.
Implementations§
Source§impl FormatRegistry
impl FormatRegistry
pub fn new() -> Self
Sourcepub fn intern(&mut self, code: &str) -> FormatId
pub fn intern(&mut self, code: &str) -> FormatId
Intern a format code.
The u16 id space is saturated deliberately: once all ids are occupied, the registry logs the loss and returns General without inserting the code.
pub fn get(&self, id: FormatId) -> Option<&NumberFormat>
pub fn class(&self, id: FormatId) -> Option<&FormatClass>
pub fn code(&self, id: FormatId) -> Option<&str>
Trait Implementations§
Source§impl Clone for FormatRegistry
impl Clone for FormatRegistry
Source§fn clone(&self) -> FormatRegistry
fn clone(&self) -> FormatRegistry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FormatRegistry
impl Debug for FormatRegistry
Auto Trait Implementations§
impl Freeze for FormatRegistry
impl RefUnwindSafe for FormatRegistry
impl Send for FormatRegistry
impl Sync for FormatRegistry
impl Unpin for FormatRegistry
impl UnsafeUnpin for FormatRegistry
impl UnwindSafe for FormatRegistry
Blanket Implementations§
impl<T> Allocation for T
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> 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