Home
last modified time | relevance | path

Searched refs:Interest (Results 1 – 25 of 40) sorted by relevance

12

/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_io/src/
H A Dinterest.rs18 pub struct Interest(NonZeroU8); struct
25 impl Interest { implementation
27 pub const READABLE: Interest = Interest(unsafe { NonZeroU8::new_unchecked(READABLE) });
29 pub const WRITABLE: Interest = Interest(unsafe { NonZeroU8::new_unchecked(WRITABLE) });
32 pub const fn add(self, other: Interest) -> Interest { in add() argument
64 impl ops::BitOr for Interest { implementation
87 use crate::Interest; in ut_interest_to_io_event()
90 let interest = Interest { in ut_interest_to_io_event()
96 let interest = Interest::READABLE; in ut_interest_to_io_event()
103 let interest = Interest::WRITABLE; in ut_interest_to_io_event()
[all …]
H A Dsource.rs16 use crate::{Interest, Selector, Token};
35 interests: Interest, in register() argument
H A Dpoll.rs17 use crate::{Events, Interest, Selector, Source, Token};
42 pub fn register<S>(&self, source: &mut S, token: Token, interests: Interest) -> io::Result<()> in register()
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_io/examples/
H A Dylong_io_tcp_server.rs23 use ylong_io::{EventTrait, Events, Interest, Poll, TcpListener, Token};
33 poll.register(&mut server, SERVER, Interest::READABLE)?; in main()
48 poll.register(&mut stream, token, Interest::READABLE | Interest::WRITABLE)?; in main()
59 poll.register(connection, event.token(), Interest::READABLE)?; in main()
65 poll.register(connection, event.token(), Interest::READABLE)?; in main()
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/src/net/
H A Dasync_source.rs24 use ylong_io::{Interest, Source};
63 pub fn new(mut io: E, interest: Option<Interest>) -> io::Result<AsyncSource<E>> { in new()
66 let interest = interest.unwrap_or_else(|| Interest::READABLE | Interest::WRITABLE); in new()
78 pub(crate) async fn async_process<F, R>(&self, interest: Interest, mut op: F) -> io::Result<R> in async_process() argument
108 interest: Interest,
122 interest: Interest,
139 interest: Interest,
163 self.poll_io(cx, Interest::READABLE, f)
172 self.poll_io(cx, Interest::WRITABLE, f)
H A Dready.rs16 use ylong_io::Interest;
99 pub(crate) fn from_interest(interest: Interest) -> Ready { in from_interest()
115 pub(crate) fn intersection(self, interest: Interest) -> Ready { in intersection()
119 pub(crate) fn satisfies(self, interest: Interest) -> bool { in satisfies()
218 use ylong_io::Interest;
392 let interest = Interest::READABLE; in ut_ready_from_interest()
396 let interest = Interest::WRITABLE; in ut_ready_from_interest()
409 let interest = Interest::READABLE; in ut_ready_intersection()
423 let interest = Interest::READABLE; in ut_ready_satisfies()
H A Dschedule_io.rs25 use ylong_io::Interest;
65 interest: Interest,
92 interest: Interest::READABLE, in default()
132 interest: Interest, in poll_readiness() argument
142 Interest::WRITABLE => waiters.writer = Some(cx.waker().clone()), in poll_readiness()
143 Interest::READABLE => waiters.reader = Some(cx.waker().clone()), in poll_readiness()
161 pub(crate) fn get_readiness(&self, interest: Interest) -> ReadyEvent { in get_readiness()
175 async fn readiness_fut(&self, interest: Interest) -> io::Result<ReadyEvent> { in readiness_fut()
310 pub(crate) fn new(schedule_io: &ScheduleIO, interest: Interest) -> Readiness<'_> { in new()
329 interest: Interest, in poll_init() argument
[all …]
H A Ddriver.rs20 use ylong_io::{Interest, Source, Token};
374 interest: Interest, in register_source_with_token() argument
383 interest: Interest, in register_source() argument
411 interest: Interest, in register_source_with_token() argument
428 interest: Interest, in register_source() argument
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/src/net/sys/unix/
H A Ddatagram.rs20 use ylong_io::{Interest, Source};
98 pub async fn ready(&self, interest: Interest) -> Result<Ready> { in ready()
133 self.ready(Interest::READABLE).await?; in readable()
170 .try_io(Interest::READABLE, || (*self.source).recv(buf)) in try_recv()
202 self.ready(Interest::WRITABLE).await?; in writable()
238 .try_io(Interest::WRITABLE, || (*self.source).send(buf)) in try_send()
327 .async_process(Interest::WRITABLE, || self.source.send(buf)) in send()
349 .async_process(Interest::WRITABLE, || { in send_to()
371 .async_process(Interest::READABLE, || self.source.recv(buf)) in recv()
393 .async_process(Interest::READABLE, || self.source.recv_from(buf)) in recv_from()
H A Dstream.rs23 use ylong_io::{Interest, Source};
61 Interest::WRITABLE, in connect()
168 pub async fn ready(&self, interest: Interest) -> Result<Ready> { in ready()
203 self.ready(Interest::READABLE).await?; in readable()
240 .try_io(Interest::READABLE, || (&*self.source).read(buf)) in try_read()
272 self.ready(Interest::WRITABLE).await?; in writable()
308 .try_io(Interest::WRITABLE, || (&*self.source).write(buf)) in try_write()
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/src/signal/unix/
H A Ddriver.rs16 use ylong_io::{Interest, UnixStream};
59 Interest::READABLE | Interest::WRITABLE, in initialize()
82 Interest::READABLE | Interest::WRITABLE, in initialize()
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/src/executor/
H A Ddriver_handle.rs30 use ylong_io::{Interest, Source};
65 interest: Interest,
108 interest: Interest,
123 use ylong_io::{Interest, Source};
137 interest: Interest,
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_io/src/sys/unix/
H A Depoll.rs19 use crate::{EventTrait, Interest, Token};
76 pub fn register(&self, fd: i32, token: Token, interests: Interest) -> io::Result<()> { in register()
89 pub fn reregister(&self, fd: i32, token: Token, interests: Interest) -> io::Result<()> { in reregister()
170 use crate::{Event, EventTrait, Interest, Selector, Token};
181 let ret = selector.register(sock, Token::from_usize(0), Interest::READABLE); in ut_epoll_reregister()
183 let ret = selector.reregister(sock, Token::from_usize(0), Interest::WRITABLE); in ut_epoll_reregister()
H A Dsource_fd.rs17 use crate::{Fd, Interest, Selector, Source, Token};
28 interests: Interest, in register() argument
H A Dwaker.rs40 use crate::Interest;
59 .register(fd, token, Interest::READABLE)
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_io/tests/
H A Duds_test.rs23 use ylong_io::{EventTrait, Events, Interest, Poll, Token, UnixDatagram, UnixListener, UnixStream};
73 poll.register(&mut server, SERVER, Interest::READABLE)?; in server()
86 poll.register(&mut stream, token, Interest::READABLE | Interest::WRITABLE)?; in server()
95 poll.register(connection, event.token(), Interest::READABLE)?; in server()
100 poll.register(connection, event.token(), Interest::READABLE)?; in server()
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/src/net/sys/
H A Dudp.rs20 use ylong_io::Interest;
383 .try_io(Interest::READABLE, || self.source.recv_from(buf)) in try_recv_from()
435 .try_io(Interest::READABLE, || self.source.peek_from(buf)) in try_peek_from()
509 self.source.entry.readiness(Interest::READABLE).await?; in readable()
533 self.source.entry.readiness(Interest::WRITABLE).await?; in writable()
959 .async_process(Interest::WRITABLE, || self.source.send(buf)) in send()
999 .try_io(Interest::WRITABLE, || self.source.send(buf)) in try_send()
1124 .try_io(Interest::READABLE, || self.source.recv(buf)) in try_recv()
1246 .try_io(Interest::READABLE, || self.source.peek(buf)) in try_peek()
1277 self.source.entry.readiness(Interest::READABLE).await?; in readable()
[all …]
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_io/src/sys/windows/
H A Dnet.rs20 use crate::{Interest, Selector, Token};
49 interests: Interest, in register() argument
102 interests: Interest,
110 interests: Interest, in new() argument
H A Dselector.rs39 use crate::{Event, Interest, Token};
65 interests: Interest, in register() argument
209 interests: Interest, in register() argument
237 interests: Interest, in reregister() argument
590 fn interests_to_afd_flags(interests: Interest) -> u32 { in interests_to_afd_flags()
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/src/net/sys/tcp/
H A Dstream.rs23 use ylong_io::Interest;
107 Interest::WRITABLE, in connect_inner()
155 self.source.entry.readiness(Interest::READABLE).await?; in readable()
191 .try_io(Interest::READABLE, || (&*self.source).read(buf)) in try_read()
222 self.source.entry.readiness(Interest::WRITABLE).await?; in writable()
256 .try_io(Interest::WRITABLE, || (&*self.source).write(buf)) in try_write()
529 .async_process(Interest::READABLE, || self.source.peek(buf)) in peek()
H A Dlistener.rs17 use ylong_io::Interest;
102 .async_process(Interest::READABLE, || self.source.accept()) in accept()
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_io/src/sys/windows/tcp/
H A Dlistener.rs22 use crate::{Interest, Selector, Source, TcpStream, Token};
149 interests: Interest, in register() argument
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/src/process/sys/unix/
H A Dpipe.rs20 use ylong_io::{Interest, Selector, Source, Token};
71 interests: Interest, in register() argument
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_io/src/sys/unix/udp/
H A Dudp_socket.rs21 use crate::{Interest, Selector, Source, Token};
761 interests: Interest, in register() argument
780 interests: Interest, in register() argument
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_io/src/sys/unix/uds/
H A Dlistener.rs24 use crate::{Interest, Selector, Source, Token, UnixStream};
170 interests: Interest, in register() argument

12