Home
last modified time | relevance | path

Searched refs:LocalResult (Results 1 – 14 of 14) sorted by relevance

/external/rust/crates/chrono/src/offset/
Dmod.rs30 pub enum LocalResult<T> { enum
41 impl<T> LocalResult<T> { implementation
45 LocalResult::Single(t) => Some(t), in single()
53 LocalResult::Single(t) | LocalResult::Ambiguous(t, _) => Some(t), in earliest()
61 LocalResult::Single(t) | LocalResult::Ambiguous(_, t) => Some(t), in latest()
67 pub fn map<U, F: FnMut(T) -> U>(self, mut f: F) -> LocalResult<U> { in map()
69 LocalResult::None => LocalResult::None, in map()
70 LocalResult::Single(v) => LocalResult::Single(f(v)), in map()
71 LocalResult::Ambiguous(min, max) => LocalResult::Ambiguous(f(min), f(max)), in map()
76 impl<Tz: TimeZone> LocalResult<Date<Tz>> { impl
[all …]
Dutc.rs8 use super::{FixedOffset, LocalResult, Offset, TimeZone};
69 fn offset_from_local_date(&self, _local: &NaiveDate) -> LocalResult<Utc> { in offset_from_local_date()
70 LocalResult::Single(Utc) in offset_from_local_date()
72 fn offset_from_local_datetime(&self, _local: &NaiveDateTime) -> LocalResult<Utc> { in offset_from_local_datetime()
73 LocalResult::Single(Utc) in offset_from_local_datetime()
Dlocal.rs10 use super::{LocalResult, TimeZone};
125 fn offset_from_local_date(&self, local: &NaiveDate) -> LocalResult<FixedOffset> { in offset_from_local_date()
129 fn offset_from_local_datetime(&self, local: &NaiveDateTime) -> LocalResult<FixedOffset> { in offset_from_local_datetime()
142 fn from_local_date(&self, local: &NaiveDate) -> LocalResult<Date<Local>> { in from_local_date()
151 fn from_local_datetime(&self, local: &NaiveDateTime) -> LocalResult<DateTime<Local>> { in from_local_datetime()
156 LocalResult::Single(DateTime::from_utc(local, offset)) in from_local_datetime()
160 fn from_local_datetime(&self, local: &NaiveDateTime) -> LocalResult<DateTime<Local>> { in from_local_datetime()
168 LocalResult::Single(tm_to_datetime(tm)) in from_local_datetime()
Dfixed.rs10 use super::{LocalResult, Offset, TimeZone};
108 fn offset_from_local_date(&self, _local: &NaiveDate) -> LocalResult<FixedOffset> { in offset_from_local_date()
109 LocalResult::Single(*self) in offset_from_local_date()
111 fn offset_from_local_datetime(&self, _local: &NaiveDateTime) -> LocalResult<FixedOffset> { in offset_from_local_datetime()
112 LocalResult::Single(*self) in offset_from_local_datetime()
/external/rust/crates/chrono/src/
Ddatetime.rs961 use offset::{FixedOffset, LocalResult, TimeZone, Utc};
971 fn from<T, D>(me: LocalResult<T>, d: &mut D) -> Result<T, D::Error> in from()
977 LocalResult::None => Err(d.error("value is not a legal timestamp")), in from()
978 LocalResult::Ambiguous(..) => Err(d.error("value is an ambiguous timestamp")), in from()
979 LocalResult::Single(val) => Ok(val), in from()
1087 use offset::{FixedOffset, LocalResult, TimeZone, Utc};
1104 fn serde_from<T, E, V>(me: LocalResult<T>, ts: &V) -> Result<T, E> in serde_from()
1111 LocalResult::None => Err(E::custom(ne_timestamp(ts))), in serde_from()
1112 LocalResult::Ambiguous(min, max) => { in serde_from()
1115 LocalResult::Single(val) => Ok(val), in serde_from()
Dlib.rs502 pub use offset::{FixedOffset, LocalResult, Offset, TimeZone, Utc};
/external/rust/crates/chrono/src/format/
Dparsed.rs13 use offset::{FixedOffset, LocalResult, Offset, TimeZone};
659 LocalResult::None => Err(IMPOSSIBLE), in to_datetime()
660 LocalResult::Single(t) => Ok(t), in to_datetime()
661 LocalResult::Ambiguous(..) => Err(NOT_ENOUGH), in to_datetime()
699 LocalResult::None => Err(IMPOSSIBLE), in to_datetime_with_timezone()
700 LocalResult::Single(t) => { in to_datetime_with_timezone()
707 LocalResult::Ambiguous(min, max) => { in to_datetime_with_timezone()
/external/llvm/lib/Analysis/
DLazyValueInfo.cpp1279 LVILatticeVal LocalResult; in getEdgeValue() local
1280 if (!getEdgeValueLocal(Val, BBFrom, BBTo, LocalResult)) in getEdgeValue()
1283 LocalResult.markOverdefined(); in getEdgeValue()
1285 if (hasSingleValue(LocalResult)) { in getEdgeValue()
1287 Result = LocalResult; in getEdgeValue()
1295 Result = LocalResult; in getEdgeValue()
1312 Result = intersect(LocalResult, InBlock); in getEdgeValue()
/external/rust/crates/chrono/
DREADME.md155 use chrono::offset::LocalResult;
169 LocalResult::Single(Utc.ymd(2014, 7, 8).and_hms(21, 15, 33)));
170 assert_eq!(Utc.ymd_opt(2014, 7, 8).and_hms_opt(80, 15, 33), LocalResult::None);
171 assert_eq!(Utc.ymd_opt(2014, 7, 38).and_hms_opt(21, 15, 33), LocalResult::None);
358 use chrono::offset::LocalResult;
364 assert_eq!(Utc.ymd_opt(2014, 11, 31), LocalResult::None);
DCHANGELOG.md178 * Make `LocalResult` `Copy/Eq/Hash`
617 - `LocalResult::map` convenience method has been added.
715 - `LocalResult` now implements a common set of traits.
717 - `LocalResult::and_*` methods have been added.
718 They are useful for safely chaining `LocalResult<Date<Off>>` methods
719 to make `LocalResult<DateTime<Off>>`.
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Analysis/
DLazyValueInfo.cpp1517 ValueLatticeElement LocalResult; in getEdgeValue() local
1518 if (!getEdgeValueLocal(Val, BBFrom, BBTo, LocalResult)) in getEdgeValue()
1521 LocalResult = ValueLatticeElement::getOverdefined(); in getEdgeValue()
1523 if (hasSingleValue(LocalResult)) { in getEdgeValue()
1525 Result = LocalResult; in getEdgeValue()
1533 Result = LocalResult; in getEdgeValue()
1551 Result = intersect(LocalResult, InBlock); in getEdgeValue()
DMemorySSAUpdater.cpp143 if (auto *LocalResult = getPreviousDefInBlock(MA)) in getPreviousDef() local
144 return LocalResult; in getPreviousDef()
/external/llvm-project/llvm/lib/Analysis/
DLazyValueInfo.cpp1425 ValueLatticeElement LocalResult = getEdgeValueLocal(Val, BBFrom, BBTo) in getEdgeValue() local
1427 if (hasSingleValue(LocalResult)) in getEdgeValue()
1429 return LocalResult; in getEdgeValue()
1449 return intersect(LocalResult, InBlock); in getEdgeValue()
DMemorySSAUpdater.cpp145 if (auto *LocalResult = getPreviousDefInBlock(MA)) in getPreviousDef() local
146 return LocalResult; in getPreviousDef()