• Home
  • Raw
  • Download

Lines Matching refs:Handle

51 pub struct Handle {  struct
59 Owned(winutil::Handle), argument
70 impl Eq for Handle {} implementation
72 impl PartialEq for Handle { implementation
73 fn eq(&self, other: &Handle) -> bool { in eq()
76 if self as *const Handle == other as *const Handle { in eq() constant
85 impl AsRawHandle for crate::Handle { implementation
94 impl IntoRawHandle for crate::Handle { implementation
103 impl Hash for Handle { implementation
109 impl Handle { implementation
110 pub fn from_path<P: AsRef<Path>>(p: P) -> io::Result<Handle> { in from_path() argument
111 let h = winutil::Handle::from_path_any(p)?; in from_path()
113 Ok(Handle::from_info(HandleKind::Owned(h), info)) in from_path()
116 pub fn from_file(file: File) -> io::Result<Handle> { in from_file() argument
117 let h = winutil::Handle::from_file(file); in from_file()
119 Ok(Handle::from_info(HandleKind::Owned(h), info)) in from_file()
122 fn from_std_handle(h: winutil::HandleRef) -> io::Result<Handle> { in from_std_handle() argument
124 Ok(info) => Ok(Handle::from_info(HandleKind::Borrowed(h), info)), in from_std_handle()
130 Err(_) => Ok(Handle { kind: HandleKind::Borrowed(h), key: None }), in from_std_handle()
137 ) -> Handle { in from_info() argument
138 Handle { in from_info()
147 pub fn stdin() -> io::Result<Handle> { in stdin()
148 Handle::from_std_handle(winutil::HandleRef::stdin()) in stdin()
151 pub fn stdout() -> io::Result<Handle> { in stdout()
152 Handle::from_std_handle(winutil::HandleRef::stdout()) in stdout()
155 pub fn stderr() -> io::Result<Handle> { in stderr()
156 Handle::from_std_handle(winutil::HandleRef::stderr()) in stderr()