pub struct RecordCell { /* private fields */ }Expand description
One readable record value associated with a stable column ID.
Implementations§
Source§impl RecordCell
impl RecordCell
Sourcepub fn new(
column_id: impl Into<SharedString>,
value: impl Into<SharedString>,
) -> Self
pub fn new( column_id: impl Into<SharedString>, value: impl Into<SharedString>, ) -> Self
Creates a cell for the identified column.
Creates a categorical tag cell.
Sourcepub fn change(
column_id: impl Into<SharedString>,
before: Option<SharedString>,
after: Option<SharedString>,
tone: RecordStatusTone,
) -> Self
pub fn change( column_id: impl Into<SharedString>, before: Option<SharedString>, after: Option<SharedString>, tone: RecordStatusTone, ) -> Self
Creates a cell describing a change from one value to another.
The change kind is carried by the tone glyph, with the struck
previous value, an arrow, and the new value as one readable run —
never a prose prefix that wraps and clips. An addition passes no
before, a removal no after; the accessible value reads as a
sentence either way.
Sourcepub fn change_before(&self) -> Option<&SharedString>
pub fn change_before(&self) -> Option<&SharedString>
The previous value of a change cell, when the change kept one.
Sourcepub fn accessible_value(&self) -> SharedString
pub fn accessible_value(&self) -> SharedString
The value assistive technology reads for this cell.
A change cell reads as a sentence — “was A, now B” — instead of leaking its visual arrow and strikethrough.
Sourcepub fn status(
column_id: impl Into<SharedString>,
value: impl Into<SharedString>,
tone: RecordStatusTone,
) -> Self
pub fn status( column_id: impl Into<SharedString>, value: impl Into<SharedString>, tone: RecordStatusTone, ) -> Self
Creates a readable semantic status cell.
Sourcepub fn kind(&self) -> RecordCellKind
pub fn kind(&self) -> RecordCellKind
Returns the cell’s typed visual structure.
Sourcepub fn tag_values(&self) -> &[SharedString]
pub fn tag_values(&self) -> &[SharedString]
Returns categorical tags for a tag cell.
Sourcepub fn status_tone(&self) -> Option<RecordStatusTone>
pub fn status_tone(&self) -> Option<RecordStatusTone>
Returns the semantic status tone for a status cell.
Trait Implementations§
Source§impl Clone for RecordCell
impl Clone for RecordCell
Source§fn clone(&self) -> RecordCell
fn clone(&self) -> RecordCell
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RecordCell
impl Debug for RecordCell
impl Eq for RecordCell
Source§impl PartialEq for RecordCell
impl PartialEq for RecordCell
impl StructuralPartialEq for RecordCell
Auto Trait Implementations§
impl Freeze for RecordCell
impl RefUnwindSafe for RecordCell
impl Send for RecordCell
impl Sync for RecordCell
impl Unpin for RecordCell
impl UnsafeUnpin for RecordCell
impl UnwindSafe for RecordCell
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Span], returning an
Instrumented wrapper.§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> ⓘ
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> ⓘ
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§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
Subscriber to this type, returning a
[WithDispatch] wrapper.