pub struct FakeClockSynchronousProxy { /* private fields */ }Implementations§
Source§impl FakeClockSynchronousProxy
 
impl FakeClockSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
    &self,
    deadline: MonotonicInstant,
) -> Result<FakeClockEvent, Error>
 
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<FakeClockEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn get(
    &self,
    ___deadline: MonotonicInstant,
) -> Result<(BootInstant, MonotonicInstant), Error>
 
pub fn get( &self, ___deadline: MonotonicInstant, ) -> Result<(BootInstant, MonotonicInstant), Error>
Gets the current time.
Sourcepub fn register_event_in_monotonic(
    &self,
    event: EventPair,
    time: MonotonicInstant,
) -> Result<(), Error>
 
pub fn register_event_in_monotonic( &self, event: EventPair, time: MonotonicInstant, ) -> Result<(), Error>
Registers the event handle event to be signaled with ZX_EVENTPAIR_SIGNALED when the
provided time is reached by the fake monotonic clock.
The FakeClock instance will retain this event (even after it’s fired) for as long as the
client-side of the provided event pair event is open.
Sourcepub fn register_event_in_boot(
    &self,
    event: EventPair,
    time: BootInstant,
) -> Result<(), Error>
 
pub fn register_event_in_boot( &self, event: EventPair, time: BootInstant, ) -> Result<(), Error>
Registers the event handle event to be signaled with ZX_EVENTPAIR_SIGNALED when the
provided time is reached by the fake boot clock.
The FakeClock instance will retain this event (even after it’s fired) for as long as the
client-side of the provided event pair event is open.
Sourcepub fn reschedule_event_in_monotonic(
    &self,
    event: EventPair,
    time: MonotonicInstant,
    ___deadline: MonotonicInstant,
) -> Result<FakeClockRescheduleEventInMonotonicResult, Error>
 
pub fn reschedule_event_in_monotonic( &self, event: EventPair, time: MonotonicInstant, ___deadline: MonotonicInstant, ) -> Result<FakeClockRescheduleEventInMonotonicResult, Error>
Reschedules an event to be signalled with ZX_EVENTPAIR_SIGNALED at the new deadline in
time on the monotonic clock.
event is a duplicate of the client-side of the event pair, and it’s used to retrieve the
originally registered event through its kernel object identifier.
Sourcepub fn reschedule_event_in_boot(
    &self,
    event: EventPair,
    time: BootInstant,
    ___deadline: MonotonicInstant,
) -> Result<FakeClockRescheduleEventInBootResult, Error>
 
pub fn reschedule_event_in_boot( &self, event: EventPair, time: BootInstant, ___deadline: MonotonicInstant, ) -> Result<FakeClockRescheduleEventInBootResult, Error>
Reschedules an event to be signalled with ZX_EVENTPAIR_SIGNALED at the new deadline in
time on the boot clock.
event is a duplicate of the client-side of the event pair, and it’s used to retrieve the
originally registered event through its kernel object identifier.
Sourcepub fn cancel_event(
    &self,
    event: EventPair,
    ___deadline: MonotonicInstant,
) -> Result<(), Error>
 
pub fn cancel_event( &self, event: EventPair, ___deadline: MonotonicInstant, ) -> Result<(), Error>
Cancels a previously registered event.
event is a duplicate of the client-side of the event pair, and it’s used to retrieve the
originally registered event through its kernel object identifier.
Sourcepub fn create_named_deadline_in_monotonic(
    &self,
    id: &DeadlineId,
    duration: i64,
    ___deadline: MonotonicInstant,
) -> Result<MonotonicInstant, Error>
 
pub fn create_named_deadline_in_monotonic( &self, id: &DeadlineId, duration: i64, ___deadline: MonotonicInstant, ) -> Result<MonotonicInstant, Error>
Calculate and set a deadline associated with an id on the monotonic clock.
The returned deadline is calculated as duration after the current fake time.
FakeClock emits two events: A SET event immediately, and an EXPIRED event when the
deadline expires. A test using FakeClockControl may reference events related to the
deadline using a matching id. See FakeClockControl.SetStopPoint for information on how a
test can wait for a deadline event.
Sourcepub fn create_named_deadline_in_boot(
    &self,
    id: &DeadlineId,
    duration: i64,
    ___deadline: MonotonicInstant,
) -> Result<BootInstant, Error>
 
pub fn create_named_deadline_in_boot( &self, id: &DeadlineId, duration: i64, ___deadline: MonotonicInstant, ) -> Result<BootInstant, Error>
Calculate and set a deadline associated with an id on the boot clock.
The returned deadline is calculated as duration after the current fake time.
FakeClock emits two events: A SET event immediately, and an EXPIRED event when the
deadline expires. A test using FakeClockControl may reference events related to the
deadline using a matching id. See FakeClockControl.SetStopPoint for information on how a
test can wait for a deadline event.
Trait Implementations§
Source§impl Debug for FakeClockSynchronousProxy
 
impl Debug for FakeClockSynchronousProxy
Source§impl From<Channel> for FakeClockSynchronousProxy
Available on Fuchsia only. 
impl From<Channel> for FakeClockSynchronousProxy
Source§impl From<FakeClockSynchronousProxy> for Handle
Available on Fuchsia only. 
impl From<FakeClockSynchronousProxy> for Handle
Source§fn from(value: FakeClockSynchronousProxy) -> Self
 
fn from(value: FakeClockSynchronousProxy) -> Self
Source§impl FromClient for FakeClockSynchronousProxy
Available on Fuchsia only. 
impl FromClient for FakeClockSynchronousProxy
Source§type Protocol = FakeClockMarker
 
type Protocol = FakeClockMarker
Source§fn from_client(value: ClientEnd<FakeClockMarker>) -> Self
 
fn from_client(value: ClientEnd<FakeClockMarker>) -> Self
Source§impl SynchronousProxy for FakeClockSynchronousProxy
Available on Fuchsia only. 
impl SynchronousProxy for FakeClockSynchronousProxy
Source§type Proxy = FakeClockProxy
 
type Proxy = FakeClockProxy
Source§type Protocol = FakeClockMarker
 
type Protocol = FakeClockMarker
Proxy controls.