Struct smartsheet_rs::models::Cell
source · [−]pub struct Cell {
pub column_id: u64,
pub column_type: Option<String>,
pub hyperlink: Option<Hyperlink>,
pub value: Option<CellValue>,
pub display_value: Option<String>,
pub object_value: Option<Value>,
pub format: Option<String>,
pub formula: Option<String>,
}Fields
column_id: u64column_type: Option<String>hyperlink: Option<Hyperlink>Represents a hyperlink to a dashboard, report, sheet, or URL.
In the most common scenario, the hyperlink is a URL link, and the url
property contains the URL value. This can more easily be retrieved
via the Cell.link_url method.
More info
- https://smartsheet-platform.github.io/api-docs/#hyperlinks
- https://smartsheet-platform.github.io/api-docs/#hyperlink-object
value: Option<CellValue>Cell.value represents a cell’s raw value and can be one of the
following primitive JSON types: string, number, or Boolean, depending
on the column type. An empty cell returns no value.
More info
- https://smartsheet-platform.github.io/api-docs/#cell-reference
display_value: Option<String>Cell.displayValue is always a string and is only returned for certain
column types. It represents the formatted value as it should be
displayed to an end-user.
Examples
If a TEXT_NUMBER column is formatted as a US Dollar currency, its value may be a number like 1234.5678, but its displayValue is “$1,234.57”.
More info
- https://smartsheet-platform.github.io/api-docs/#cell-reference
object_value: Option<Value>Cell.objectValue is an object representation of a cell’s value and
is currently used for adding or updating predecessor cell values, or
for multi-contact details, such as email addresses.
More info
- https://smartsheet-platform.github.io/api-docs/#cell-reference
format: Option<String>formula: Option<String>Implementations
sourceimpl Cell
impl Cell
sourcepub fn value_as_str(&self) -> Result<&str, Box<dyn Error + Send + Sync>>
pub fn value_as_str(&self) -> Result<&str, Box<dyn Error + Send + Sync>>
Retrieve the Cell value as a string
sourcepub fn value_as_str_safe(&self) -> Option<&str>
pub fn value_as_str_safe(&self) -> Option<&str>
Retrieve the Cell value as a string, but prefer to use an
Option implementation instead, which can be unwrapped.
sourcepub fn value_as_number(&self) -> Result<&Number, Box<dyn Error + Send + Sync>>
pub fn value_as_number(&self) -> Result<&Number, Box<dyn Error + Send + Sync>>
Retrieve the Cell value as a Number
sourcepub fn value_as_bool(&self) -> Result<bool, Box<dyn Error + Send + Sync>>
pub fn value_as_bool(&self) -> Result<bool, Box<dyn Error + Send + Sync>>
Retrieve the Cell value as a boolean
sourcepub fn value_as_u64(&self) -> Result<u64, Box<dyn Error + Send + Sync>>
pub fn value_as_u64(&self) -> Result<u64, Box<dyn Error + Send + Sync>>
Retrieve the Cell value as an unsigned integer
sourcepub fn value_as_f64(&self) -> Result<f64, Box<dyn Error + Send + Sync>>
pub fn value_as_f64(&self) -> Result<f64, Box<dyn Error + Send + Sync>>
Retrieve the Cell value as a float
sourcepub fn display_value_as_str(&self) -> Result<&str, Box<dyn Error + Send + Sync>>
pub fn display_value_as_str(&self) -> Result<&str, Box<dyn Error + Send + Sync>>
Retrieve the Cell display_value as a string
sourcepub fn display_value_as_str_safe(&self) -> Option<&str>
pub fn display_value_as_str_safe(&self) -> Option<&str>
Retrieve the Cell display_value as a string, but prefer to use an
Option implementation instead, which can be unwrapped.
sourcepub fn link_url(&self) -> Result<&str, Box<dyn Error + Send + Sync>>
pub fn link_url(&self) -> Result<&str, Box<dyn Error + Send + Sync>>
Retrieve the Cell hyperlink URL as a string
sourcepub fn link_url_safe(&self) -> Option<&str>
pub fn link_url_safe(&self) -> Option<&str>
Retrieve the Cell hyperlink URL as a string, but prefer to use an
Option implementation instead, which can be unwrapped.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Cell
impl<'de> Deserialize<'de> for Cell
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 Cell
Auto Trait Implementations
impl RefUnwindSafe for Cell
impl Send for Cell
impl Sync for Cell
impl Unpin for Cell
impl UnwindSafe for Cell
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