pub struct Entry<'a, I: Instance + ?Sized> { /* private fields */ }Implementations§
Source§impl<I: Instance + ?Sized> Entry<'_, I>
impl<I: Instance + ?Sized> Entry<'_, I>
pub fn value(&self) -> Value
Sourcepub fn value_bool(&self) -> Option<bool>
pub fn value_bool(&self) -> Option<bool>
Returns the value of this entry if it is of the specified type.
Returns None if the type of the entry is not of the specified type.
Sourcepub fn value_i64(&self) -> Option<i64>
pub fn value_i64(&self) -> Option<i64>
Returns the value of this entry if it is of the specified type.
Returns None if the type of the entry is not of the specified type.
Sourcepub fn value_f32(&self) -> Option<f32>
pub fn value_f32(&self) -> Option<f32>
Returns the value of this entry if it is of the specified type.
Returns None if the type of the entry is not of the specified type.
Sourcepub fn value_f64(&self) -> Option<f64>
pub fn value_f64(&self) -> Option<f64>
Returns the value of this entry if it is of the specified type.
Returns None if the type of the entry is not of the specified type.
Sourcepub fn value_string(&self) -> Option<String>
pub fn value_string(&self) -> Option<String>
Returns the value of this entry if it is of the specified type.
Returns None if the type of the entry is not of the specified type.
Sourcepub fn value_raw(&self) -> Option<Vec<u8>>
pub fn value_raw(&self) -> Option<Vec<u8>>
Returns the value of this entry if it is of the specified type.
Returns None if the type of the entry is not of the specified type.
Sourcepub fn value_bool_array(&self) -> Option<Vec<bool>>
pub fn value_bool_array(&self) -> Option<Vec<bool>>
Returns the value of this entry if it is of the specified type.
Returns None if the type of the entry is not of the specified type.
Sourcepub fn value_f64_array(&self) -> Option<Vec<f64>>
pub fn value_f64_array(&self) -> Option<Vec<f64>>
Returns the value of this entry if it is of the specified type.
Returns None if the type of the entry is not of the specified type.
Sourcepub fn value_f32_array(&self) -> Option<Vec<f32>>
pub fn value_f32_array(&self) -> Option<Vec<f32>>
Returns the value of this entry if it is of the specified type.
Returns None if the type of the entry is not of the specified type.
Sourcepub fn value_i64_array(&self) -> Option<Vec<i64>>
pub fn value_i64_array(&self) -> Option<Vec<i64>>
Returns the value of this entry if it is of the specified type.
Returns None if the type of the entry is not of the specified type.
Sourcepub fn value_string_array(&self) -> Option<Vec<String>>
pub fn value_string_array(&self) -> Option<Vec<String>>
Returns the value of this entry if it is of the specified type.
Returns None if the type of the entry is not of the specified type.
pub fn value_type(&self) -> ValueType
pub fn set_value(&self, value: Value) -> Result<(), NetworkTablesError>
Sourcepub fn set_value_bool(&self, value: bool) -> Result<(), NetworkTablesError>
pub fn set_value_bool(&self, value: bool) -> Result<(), NetworkTablesError>
Sets the value of this entry to the given value if it is of the type of the given value.
§Errors
- [
NetworkTablesEntryError::InvalidType] if the type of the entry is not of the specified type.
Sourcepub fn set_value_i64(&self, value: i64) -> Result<(), NetworkTablesError>
pub fn set_value_i64(&self, value: i64) -> Result<(), NetworkTablesError>
Sets the value of this entry to the given value if it is of the type of the given value.
§Errors
- [
NetworkTablesEntryError::InvalidType] if the type of the entry is not of the specified type.
Sourcepub fn set_value_f32(&self, value: f32) -> Result<(), NetworkTablesError>
pub fn set_value_f32(&self, value: f32) -> Result<(), NetworkTablesError>
Sets the value of this entry to the given value if it is of the type of the given value.
§Errors
- [
NetworkTablesEntryError::InvalidType] if the type of the entry is not of the specified type.
Sourcepub fn set_value_f64(&self, value: f64) -> Result<(), NetworkTablesError>
pub fn set_value_f64(&self, value: f64) -> Result<(), NetworkTablesError>
Sets the value of this entry to the given value if it is of the type of the given value.
§Errors
- [
NetworkTablesEntryError::InvalidType] if the type of the entry is not of the specified type.
Sourcepub fn set_value_raw(&self, value: Vec<u8>) -> Result<(), NetworkTablesError>
pub fn set_value_raw(&self, value: Vec<u8>) -> Result<(), NetworkTablesError>
Sets the value of this entry to the given value if it is of the type of the given value.
§Errors
- [
NetworkTablesEntryError::InvalidType] if the type of the entry is not of the specified type.
Sourcepub fn set_value_bool_array(
&self,
value: Vec<bool>,
) -> Result<(), NetworkTablesError>
pub fn set_value_bool_array( &self, value: Vec<bool>, ) -> Result<(), NetworkTablesError>
Sets the value of this entry to the given value if it is of the type of the given value.
§Errors
- [
NetworkTablesEntryError::InvalidType] if the type of the entry is not of the specified type.
Sourcepub fn set_value_f64_array(
&self,
value: Vec<f64>,
) -> Result<(), NetworkTablesError>
pub fn set_value_f64_array( &self, value: Vec<f64>, ) -> Result<(), NetworkTablesError>
Sets the value of this entry to the given value if it is of the type of the given value.
§Errors
- [
NetworkTablesEntryError::InvalidType] if the type of the entry is not of the specified type.
Sourcepub fn set_value_f32_array(
&self,
value: Vec<f32>,
) -> Result<(), NetworkTablesError>
pub fn set_value_f32_array( &self, value: Vec<f32>, ) -> Result<(), NetworkTablesError>
Sets the value of this entry to the given value if it is of the type of the given value.
§Errors
- [
NetworkTablesEntryError::InvalidType] if the type of the entry is not of the specified type.
Sourcepub fn set_value_i64_array(
&self,
value: Vec<i64>,
) -> Result<(), NetworkTablesError>
pub fn set_value_i64_array( &self, value: Vec<i64>, ) -> Result<(), NetworkTablesError>
Sets the value of this entry to the given value if it is of the type of the given value.
§Errors
- [
NetworkTablesEntryError::InvalidType] if the type of the entry is not of the specified type.
Sourcepub fn set_value_string_array(
&self,
value: Vec<String>,
) -> Result<(), NetworkTablesError>
pub fn set_value_string_array( &self, value: Vec<String>, ) -> Result<(), NetworkTablesError>
Sets the value of this entry to the given value if it is of the type of the given value.
§Errors
- [
NetworkTablesEntryError::InvalidType] if the type of the entry is not of the specified type.
Sourcepub fn set_value_string(
&self,
value: impl AsRef<str>,
) -> Result<(), NetworkTablesError>
pub fn set_value_string( &self, value: impl AsRef<str>, ) -> Result<(), NetworkTablesError>
Sets the value of this entry to the given value if it is of the type of the given value.
§Errors
- [
NetworkTablesEntryError::InvalidType] if the type of the entry is not of the specified type.