pub enum CellValue {
Text(String),
Boolean(bool),
Numeric(Number),
}
Expand description
Represents the value
attribute in the Cell
struct definition.
Will be transmitted as one of the following:
* text – a string
value
* number – a numeric value, generally an f64
type
* boolean – a bool
value
§Description
Per the docs, this value represents one of either a string, a number, or a Boolean value – depending on the cell type and the data in the cell. Cell values larger than 4000 characters are silently truncated. An empty cell returns no value.
§Docs
- https://smartsheet-platform.github.io/api-docs/#cell-object
- https://smartsheet-platform.github.io/api-docs/#cell-reference
Variants§
Implementations§
Source§impl CellValue
impl CellValue
pub fn as_str(&self) -> Result<&str, Box<dyn Error + Send + Sync>>
pub fn as_str_safe(&self) -> Option<&str>
pub fn as_number(&self) -> Result<&Number, Box<dyn Error + Send + Sync>>
pub fn as_u64(&self) -> Result<u64, Box<dyn Error + Send + Sync>>
pub fn as_f64(&self) -> Result<f64, Box<dyn Error + Send + Sync>>
pub fn as_bool(&self) -> Result<bool, Box<dyn Error + Send + Sync>>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CellValue
impl<'de> Deserialize<'de> for CellValue
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<LightPicker> for CellValue
impl From<LightPicker> for CellValue
Source§fn from(value: LightPicker) -> Self
fn from(value: LightPicker) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for CellValue
Auto Trait Implementations§
impl Freeze for CellValue
impl RefUnwindSafe for CellValue
impl Send for CellValue
impl Sync for CellValue
impl Unpin for CellValue
impl UnwindSafe for CellValue
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