Skip to main content

CellMeta

Struct CellMeta 

Source
pub struct CellMeta {
    pub label: String,
    pub is_bool: bool,
    pub is_numeric: bool,
    pub is_integer: bool,
    pub display: Box<dyn Fn(&Sheet) -> String>,
    pub write_str: WriteStrFn,
    pub range: Option<Box<dyn Fn(&Sheet) -> (f64, f64)>>,
}
Expand description

Display and write metadata for a single cell.

Fields§

§label: String

Human-readable cell name shown in the inspector.

§is_bool: bool

true if the cell holds a bool, so crate::SheetInspector can render it as a checkbox instead of a text field.

§is_numeric: bool

true if the cell holds one of the 14 numeric primitive types, so crate::SheetInspector can render it with crate::spectrum::SpNumberfield instead of a plain text field.

§is_integer: bool

true if the cell holds one of the 12 integer primitive types (as opposed to f32/f64), so crate::SheetInspector can set its numeric widget’s step to 1 — crate::spectrum::SpNumberfield’s, or, for a range-filtered cell, crate::spectrum::SpSlider’s — since an integer cell has no fractional steps to land on.

§display: Box<dyn Fn(&Sheet) -> String>

Returns the current cell value as a display string.

§write_str: WriteStrFn

Parses s and writes the result to the cell; returns Err on parse failure or type mismatch. May also always return Err for a cell type with no write support yet (e.g. compound values — see Labels::add_compound_cell).

§range: Option<Box<dyn Fn(&Sheet) -> (f64, f64)>>

Live slider bounds, present only for a numeric cell whose filter is a adam_rs::FilterKind::Range — recomputed from the filter’s current argument values on every call, so a range driven by other cells or relationships stays live. Cast to f64 for display, matching format_rounded’s existing all-numeric-types-as-f64 convention.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> InitializeFromFunction<T> for T

§

fn initialize_from_function(f: fn() -> T) -> T

Create an instance of this type from an initialization function
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<Ret> SpawnIfAsync<(), Ret> for Ret

§

fn spawn(self) -> Ret

Spawn the value into the dioxus runtime if it is an async block
§

impl<T, O> SuperFrom<T> for O
where O: From<T>,

§

fn super_from(input: T) -> O

Convert from a type to another type.
§

impl<T, O, M> SuperInto<O, M> for T
where O: SuperFrom<T, M>,

§

fn super_into(self) -> O

Convert from a type to another type.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<S, T> Upcast<T> for S
where T: UpcastFrom<S> + ?Sized, S: ?Sized,

Source§

fn upcast(&self) -> &T
where Self: ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider ref type within the Wasm bindgen generics type system. Read more
Source§

fn upcast_into(self) -> T
where Self: Sized + ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider type within the Wasm bindgen generics type system. Read more
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more