Skip to main content

AxSub

Struct AxSub 

Source
pub struct AxSub {
    pub opened: Instant,
    /* private fields */
}

Fields§

§opened: Instant

When the connection’s first request went out.

Implementations§

Source§

impl AxSub

Source

pub async fn open( adapter: &mut AdapterHandle, rsd: &RsdHandshake, ) -> Result<Self>

Source

pub fn is_closed(&self) -> bool

Source

pub fn request(&self) -> Result<Instant>

Ask the phone for a new dump. Returns when the request was made.

The phone answers a request about 1.1 s after the last one it got: every new request restarts that wait, so asking again while an answer is on its way only delays it.

Source

pub fn unasked_since(&self, since: Instant) -> bool

True when the phone sent a dump nobody asked for at or after since.

Source

pub fn unparsed_count(&self) -> u64

Source

pub async fn wait_arrived( &mut self, earliest: Instant, timeout: Duration, ) -> Option<(u64, Arc<Dump>)>

Wait for a first-pass dump that arrived at or after earliest.

Source

pub async fn ask( &mut self, key: ObjKey, attribute: i64, timeout: Duration, ) -> Option<Ka>

Ask for one attribute of one element. The phone answers in tens of milliseconds and, unlike a dump, does not wait for the screen to be still. Some(Ka::Null) means the element has no such attribute (or is gone); None that no answer came within timeout.

Source

pub fn seq(&self) -> u64

Source

pub fn empty_count(&self) -> u64

Source

pub fn latest(&self) -> Option<(u64, Arc<Dump>, Duration)>

Latest first-pass dump with its sequence number and age.

Source

pub fn latest_arrival(&self) -> Option<Instant>

When the latest first-pass dump arrived.

Source

pub fn initials_since(&self, since: Instant) -> usize

How many first-pass dumps arrived at or after since.

Source

pub fn full(&self, seq: u64) -> Option<Arc<Dump>>

Latest dump with second-pass attributes, if it belongs to reading seq.

Source

pub async fn wait_full( &mut self, seq: u64, timeout: Duration, ) -> Option<Arc<Dump>>

Wait for the second pass of reading seq.

Trait Implementations§

Source§

impl Drop for AxSub

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for AxSub

§

impl !UnwindSafe for AxSub

§

impl Forget for AxSub

§

impl Freeze for AxSub

§

impl Move for AxSub

§

impl Send for AxSub

§

impl Sync for AxSub

§

impl Unpin for AxSub

§

impl UnsafeUnpin for AxSub

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> ParallelSend for T

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

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

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more