Enum smartsheet_rs::models::CellValue
source · [−]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
Text(String)
Boolean(bool)
Numeric(Number)
Implementations
sourceimpl 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
sourceimpl<'de> Deserialize<'de> for CellValue
impl<'de> Deserialize<'de> for CellValue
sourcefn 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
impl StructuralPartialEq for CellValue
Auto Trait Implementations
impl RefUnwindSafe for CellValue
impl Send for CellValue
impl Sync for CellValue
impl Unpin for CellValue
impl UnwindSafe for CellValue
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn 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>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more