Home
last modified time | relevance | path

Searched refs:to_std (Results 1 – 5 of 5) sorted by relevance

/external/rust/crates/chrono/src/
Doldtime.rs294 pub fn to_std(&self) -> Result<StdDuration, OutOfRangeError> { in to_std() method
651 assert_eq!(Duration::seconds(1).to_std(), Ok(StdDuration::new(1, 0))); in test_to_std()
652 assert_eq!(Duration::seconds(86401).to_std(), Ok(StdDuration::new(86401, 0))); in test_to_std()
653 assert_eq!(Duration::milliseconds(123).to_std(), Ok(StdDuration::new(0, 123000000))); in test_to_std()
654 assert_eq!(Duration::milliseconds(123765).to_std(), Ok(StdDuration::new(123, 765000000))); in test_to_std()
655 assert_eq!(Duration::nanoseconds(777).to_std(), Ok(StdDuration::new(0, 777))); in test_to_std()
656 assert_eq!(MAX.to_std(), Ok(StdDuration::new(9223372036854775, 807000000))); in test_to_std()
657 assert_eq!(Duration::seconds(-1).to_std(), Err(OutOfRangeError(()))); in test_to_std()
658 assert_eq!(Duration::milliseconds(-1).to_std(), Err(OutOfRangeError(()))); in test_to_std()
/external/rust/crates/nix/src/sys/socket/
Daddr.rs319 pub fn to_std(&self) -> net::SocketAddr { in to_std() method
323 Ipv4Addr(sa.sin_addr).to_std(), in to_std()
327 Ipv6Addr(sa.sin6_addr).to_std(), in to_std()
383 pub fn to_std(&self) -> net::IpAddr { in to_std() method
385 IpAddr::V4(ref ip) => net::IpAddr::V4(ip.to_std()), in to_std()
386 IpAddr::V6(ref ip) => net::IpAddr::V6(ip.to_std()), in to_std()
436 pub fn to_std(self) -> net::Ipv4Addr { in to_std() method
491 pub fn to_std(&self) -> net::Ipv6Addr { in to_std() method
499 self.to_std().fmt(fmt) in fmt()
/external/rust/crates/chrono/
DREADME.md102 [`Duration::to_std`](https://docs.rs/time/0.1.40/time/struct.Duration.html#method.to_std)
/external/rust/crates/nix/test/sys/
Dtest_socket.rs33 let inet = addr.to_std(); in test_inetv4_addr_to_sock_addr()
56 assert_eq!(actual, addr.to_std()); in test_inetv6_addr_to_sock_addr()
/external/rust/crates/nix/
DCHANGELOG.md274 - `Ipv4Addr::octets`, `Ipv4Addr::to_std`, `Error::as_errno`,
368 - Added `from_std` and `to_std` methods for `sys::socket::IpAddr`