Struct LogStream

Source
pub struct LogStream { /* private fields */ }
Expand description

§Log Steam

This object represents a started log block that is currently returning data at regular intervals.

Dropping this object or the associated LogBlock will delete the log block in the Crazyflie.

See the log module documentation for more context and information.

Implementations§

Source§

impl LogStream

Source

pub async fn stop(self) -> Result<LogBlock>

Stops the log block from streaming

This method consumes the stream and returns back the log block object so that it can be started again later with a different period.

This function can only fail on unexpected protocol error. If it does, the log block is dropped and will be cleaned-up next time a log block is created.

Source

pub async fn next(&self) -> Result<LogData>

Get the next log data from the log block stream

This function will wait for the data and only return a value when the next data is available.

This function will return an error if the Crazyflie gets disconnected.

Auto Trait Implementations§

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

impl<T> ErasedDestructor for T
where T: 'static,