TopicSubscriber

Struct TopicSubscriber 

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

Implementations§

Source§

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

Source

pub fn try_read_update_queue_raw(&self) -> Option<Vec<RawValue>>

Returns all of the new topic values since the last read in their raw form (timestamps included).

If there have been no new updates, None is returned.

Source

pub fn try_read_update_queue(&self) -> Option<Vec<Value>>

Source

pub fn update_queue_raw(&self) -> TopicSubscriberReadQueueRawFuture<'_, I>

Source

pub async fn update_queue(&self) -> Vec<Value>

Source

pub async fn value(&self) -> Value

Source

pub async fn value_bool(&self) -> Option<bool>

Returns the value of this topic if it is of the specified type. Returns None if the type of the entry is not of the specified type.

Source

pub async fn value_i64(&self) -> Option<i64>

Returns the value of this topic if it is of the specified type. Returns None if the type of the entry is not of the specified type.

Source

pub async fn value_f32(&self) -> Option<f32>

Returns the value of this topic if it is of the specified type. Returns None if the type of the entry is not of the specified type.

Source

pub async fn value_f64(&self) -> Option<f64>

Returns the value of this topic if it is of the specified type. Returns None if the type of the entry is not of the specified type.

Source

pub async fn value_string(&self) -> Option<String>

Returns the value of this topic if it is of the specified type. Returns None if the type of the entry is not of the specified type.

Source

pub async fn value_raw(&self) -> Option<Vec<u8>>

Returns the value of this topic if it is of the specified type. Returns None if the type of the entry is not of the specified type.

Source

pub async fn value_bool_array(&self) -> Option<Vec<bool>>

Returns the value of this topic if it is of the specified type. Returns None if the type of the entry is not of the specified type.

Source

pub async fn value_f64_array(&self) -> Option<Vec<f64>>

Returns the value of this topic if it is of the specified type. Returns None if the type of the entry is not of the specified type.

Source

pub async fn value_f32_array(&self) -> Option<Vec<f32>>

Returns the value of this topic if it is of the specified type. Returns None if the type of the entry is not of the specified type.

Source

pub async fn value_i64_array(&self) -> Option<Vec<i64>>

Returns the value of this topic if it is of the specified type. Returns None if the type of the entry is not of the specified type.

Source

pub async fn value_string_array(&self) -> Option<Vec<String>>

Returns the value of this topic if it is of the specified type. Returns None if the type of the entry is not of the specified type.

Source

pub unsafe fn handle(&self) -> NT_Subscriber

§Safety

Caller must ensure that the returned handle is only used while the topic and subscriber is valid.

Trait Implementations§

Source§

impl<'a, I: Debug + Instance + ?Sized> Debug for TopicSubscriber<'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 TopicSubscriber<'_, I>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl<'a, I: Hash + Instance + ?Sized> Hash for TopicSubscriber<'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 TopicSubscriber<'a, I>

Source§

fn eq(&self, other: &TopicSubscriber<'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 TopicSubscriber<'a, I>

Source§

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

Auto Trait Implementations§

§

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

§

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

§

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

§

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

§

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

§

impl<'a, I> UnwindSafe for TopicSubscriber<'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.