pub enum PushSourcePuppetRequest {
SetSample {
sample: TimeSample,
responder: PushSourcePuppetSetSampleResponder,
},
SetStatus {
status: Status,
responder: PushSourcePuppetSetStatusResponder,
},
Crash {
responder: PushSourcePuppetCrashResponder,
},
GetLifetimeServedConnections {
responder: PushSourcePuppetGetLifetimeServedConnectionsResponder,
},
_UnknownMethod {
ordinal: u64,
control_handle: PushSourcePuppetControlHandle,
method_type: MethodType,
},
}
Expand description
Used to manipulate the internal push source for testing.
Variants§
SetSample
Sets the next sample to be reported by the push source.
SetStatus
Sets the next status to be reported by the push source.
Crash
Deliberately crash the time source.
Fields
§
responder: PushSourcePuppetCrashResponder
GetLifetimeServedConnections
Returns the number of cumulative connections served during the lifetime of the PushSourcePuppet. This allows asserting behavior, such as when Timekeeper has restarted a connection. Timekeeper’s lifetime is independent of that of PushSourcePuppet.
Fields
_UnknownMethod
An interaction was received which does not match any known method.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§
control_handle: PushSourcePuppetControlHandle
§
method_type: MethodType
Implementations§
Source§impl PushSourcePuppetRequest
impl PushSourcePuppetRequest
pub fn into_set_sample( self, ) -> Option<(TimeSample, PushSourcePuppetSetSampleResponder)>
pub fn into_set_status( self, ) -> Option<(Status, PushSourcePuppetSetStatusResponder)>
pub fn into_crash(self) -> Option<PushSourcePuppetCrashResponder>
pub fn into_get_lifetime_served_connections( self, ) -> Option<PushSourcePuppetGetLifetimeServedConnectionsResponder>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PushSourcePuppetRequest
impl !RefUnwindSafe for PushSourcePuppetRequest
impl Send for PushSourcePuppetRequest
impl Sync for PushSourcePuppetRequest
impl Unpin for PushSourcePuppetRequest
impl !UnwindSafe for PushSourcePuppetRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more