Entry

Struct Entry 

Source
pub struct Entry<'a, I: Instance + ?Sized> { /* private fields */ }

Implementations§

Source§

impl<I: Instance + ?Sized> Entry<'_, I>

Source

pub fn value(&self) -> Value

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn value_type(&self) -> ValueType

Source

pub fn set_value(&self, value: Value) -> Result<(), NetworkTablesError>

Source

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.
Source

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.
Source

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.
Source

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.
Source

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.
Source

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.
Source

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.
Source

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.
Source

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.
Source

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.
Source

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.
Source

pub fn set_flags(&self, flags: ValueFlags) -> Result<(), NetworkTablesError>

Source

pub fn is_assigned(&self) -> bool

Source

pub fn is_unassigned(&self) -> bool

Source

pub fn name(&self) -> &str

Source

pub fn raw_value(&self) -> RawValue

Source

pub unsafe fn handle(&self) -> NT_Entry

§Safety

Caller must ensure that the returned handle is only used while the table entry is valid.

Trait Implementations§

Source§

impl<'a, I: Debug + Instance + ?Sized> Debug for Entry<'a, I>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<I: Instance + ?Sized> Drop for Entry<'_, I>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl<'a, I: Hash + Instance + ?Sized> Hash for Entry<'a, I>

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<'a, I: PartialEq + Instance + ?Sized> PartialEq for Entry<'a, I>

Source§

fn eq(&self, other: &Entry<'a, I>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a, I: Eq + Instance + ?Sized> Eq for Entry<'a, I>

Source§

impl<'a, I: Instance + ?Sized> StructuralPartialEq for Entry<'a, I>

Auto Trait Implementations§

§

impl<'a, I> Freeze for Entry<'a, I>
where I: ?Sized,

§

impl<'a, I> RefUnwindSafe for Entry<'a, I>
where I: RefUnwindSafe + ?Sized,

§

impl<'a, I> Send for Entry<'a, I>
where I: Sync + ?Sized,

§

impl<'a, I> Sync for Entry<'a, I>
where I: Sync + ?Sized,

§

impl<'a, I> Unpin for Entry<'a, I>
where I: ?Sized,

§

impl<'a, I> UnwindSafe for Entry<'a, I>
where I: RefUnwindSafe + ?Sized,

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
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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.

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.