• Home
  • Raw
  • Download

Lines Matching full:crate

7 use crate::runtime::park::{ParkThread, UnparkThread};
13 pub(crate) struct Driver {
18 pub(crate) struct Handle {
20 pub(crate) io: IoHandle,
24 pub(crate) signal: SignalHandle,
27 pub(crate) time: TimeHandle,
31 pub(crate) clock: Clock,
34 pub(crate) struct Cfg {
35 pub(crate) enable_io: bool,
36 pub(crate) enable_time: bool,
37 pub(crate) enable_pause_time: bool,
38 pub(crate) start_paused: bool,
39 pub(crate) nevents: usize,
43 pub(crate) fn new(cfg: Cfg) -> io::Result<(Self, Handle)> { in new()
62 pub(crate) fn park(&mut self, handle: &Handle) { in park()
66 pub(crate) fn park_timeout(&mut self, handle: &Handle, duration: Duration) { in park_timeout()
70 pub(crate) fn shutdown(&mut self, handle: &Handle) { in shutdown()
76 pub(crate) fn unpark(&self) { in unpark()
87 pub(crate) fn io(&self) -> &crate::runtime::io::Handle {
96 pub(crate) fn signal(&self) -> &crate::runtime::signal::Handle {
108 pub(crate) fn time(&self) -> &crate::runtime::time::Handle {
115 pub(crate) fn clock(&self) -> &Clock {
125 pub(crate) type IoDriver = crate::runtime::io::Driver;
128 pub(crate) enum IoStack {
134 pub(crate) enum IoHandle {
135 Enabled(crate::runtime::io::Handle),
144 let (io_driver, io_handle) = crate::runtime::io::Driver::new(nevents)?;
160 pub(crate) fn park(&mut self, handle: &Handle) {
167 pub(crate) fn park_timeout(&mut self, handle: &Handle, duration: Duration) {
174 pub(crate) fn shutdown(&mut self, handle: &Handle) {
183 pub(crate) fn unpark(&self) {
190 pub(crate) fn as_ref(&self) -> Option<&crate::runtime::io::Handle> {
200 pub(crate) type IoHandle = UnparkThread;
203 pub(crate) struct IoStack(ParkThread);
212 pub(crate) fn park(&mut self, _handle: &Handle) {
216 pub(crate) fn park_timeout(&mut self, _handle: &Handle, duration: Duration) {
220 pub(crate) fn shutdown(&mut self, _handle: &Handle) {
229 type SignalDriver = crate::runtime::signal::Driver;
230 pub(crate) type SignalHandle = Option<crate::runtime::signal::Handle>;
232 …fn create_signal_driver(io_driver: IoDriver, io_handle: &crate::runtime::io::Handle) -> io::Result…
233 let driver = crate::runtime::signal::Driver::new(io_driver, io_handle)?;
240 pub(crate) type SignalHandle = ();
245 …fn create_signal_driver(io_driver: IoDriver, _io_handle: &crate::runtime::io::Handle) -> io::Resul…
254 type ProcessDriver = crate::runtime::process::Driver;
275 pub(crate) enum TimeDriver {
277 driver: crate::runtime::time::Driver,
282 pub(crate) type Clock = crate::time::Clock;
283 pub(crate) type TimeHandle = Option<crate::runtime::time::Handle>;
286 crate::time::Clock::new(enable_pausing, start_paused)
295 let (driver, handle) = crate::runtime::time::Driver::new(io_stack, clock);
304 pub(crate) fn park(&mut self, handle: &Handle) {
311 pub(crate) fn park_timeout(&mut self, handle: &Handle, duration: Duration) {
318 pub(crate) fn shutdown(&mut self, handle: &Handle) {
330 pub(crate) type Clock = ();
331 pub(crate) type TimeHandle = ();