pub struct AxSub {
pub opened: Instant,
/* private fields */
}Fields§
§opened: InstantWhen the connection’s first request went out.
Implementations§
Source§impl AxSub
impl AxSub
pub async fn open( adapter: &mut AdapterHandle, rsd: &RsdHandshake, ) -> Result<Self>
pub fn is_closed(&self) -> bool
Sourcepub fn request(&self) -> Result<Instant>
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.
Sourcepub fn unasked_since(&self, since: Instant) -> bool
pub fn unasked_since(&self, since: Instant) -> bool
True when the phone sent a dump nobody asked for at or after since.
pub fn unparsed_count(&self) -> u64
Sourcepub async fn wait_arrived(
&mut self,
earliest: Instant,
timeout: Duration,
) -> Option<(u64, Arc<Dump>)>
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.
Sourcepub async fn ask(
&mut self,
key: ObjKey,
attribute: i64,
timeout: Duration,
) -> Option<Ka>
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.
pub fn seq(&self) -> u64
pub fn empty_count(&self) -> u64
Sourcepub fn latest(&self) -> Option<(u64, Arc<Dump>, Duration)>
pub fn latest(&self) -> Option<(u64, Arc<Dump>, Duration)>
Latest first-pass dump with its sequence number and age.
Sourcepub fn latest_arrival(&self) -> Option<Instant>
pub fn latest_arrival(&self) -> Option<Instant>
When the latest first-pass dump arrived.
Sourcepub fn initials_since(&self, since: Instant) -> usize
pub fn initials_since(&self, since: Instant) -> usize
How many first-pass dumps arrived at or after since.