/aosp_15_r20/external/deqp/framework/common/ |
H A D | tcuEither.cpp | 15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 * \brief Template class that is either type of Left or Right. 86 const Either<int, float> either(intValue); in Either_selfTest() local 88 TCU_CHECK(either.isFirst()); in Either_selfTest() 89 TCU_CHECK(!either.isSecond()); in Either_selfTest() 91 TCU_CHECK(either.is<int>()); in Either_selfTest() 92 TCU_CHECK(!either.is<float>()); in Either_selfTest() 94 TCU_CHECK(either.getFirst() == intValue); in Either_selfTest() 95 TCU_CHECK(either.get<int>() == intValue); in Either_selfTest() 101 const Either<int, float> either(floatValue); in Either_selfTest() local [all …]
|
H A D | tcuEither.hpp | 17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 23 * \brief Template class that is either type of First or Second. 32 * \brief Object containing Either First or Second type of object 40 class Either class 43 Either(const First &first); 44 Either(const Second &second); 45 ~Either(void); 47 Either(const Either<First, Second> &other); 48 Either &operator=(const Either<First, Second> &other); 50 Either &operator=(const First &first); [all …]
|
/aosp_15_r20/external/rust/android-crates-io/crates/either/src/ |
D | lib.rs | 1 //! The enum [`Either`] with variants `Left` and `Right` is a general purpose 4 //! [`Either`]: enum.Either.html 12 //! Disabled by default. Enable to `#[derive(Serialize, Deserialize)]` for `Either` 15 #![doc(html_root_url = "https://docs.rs/either/1/")] 39 pub use crate::Either::{Left, Right}; 41 /// The enum `Either` with variants `Left` and `Right` is a general purpose 44 /// The `Either` type is symmetric and treats its variants the same way, without 49 pub enum Either<L, R> { enum 56 /// Evaluate the provided expression for both [`Either::Left`] and [`Either::Right`]. 58 /// This macro is useful in cases where both sides of [`Either`] can be interacted with [all …]
|
D | serde_untagged.rs | 1 //! Untagged serialization/deserialization support for Either<L, R>. 3 //! `Either` uses default, externally-tagged representation. 10 //! use either::Either; 16 //! #[serde(with = "either::serde_untagged")] 17 //! inner: Either<Vec<String>, HashMap<String, i32>> 22 //! inner: Either::Left(vec!["Hello".to_string()]) 40 enum Either<L, R> { enum 45 pub fn serialize<L, R, S>(this: &super::Either<L, R>, serializer: S) -> Result<S::Ok, S::Error> in serialize() 52 super::Either::Left(left) => Either::Left(left), in serialize() 53 super::Either::Right(right) => Either::Right(right), in serialize() [all …]
|
D | serde_untagged_optional.rs | 1 //! Untagged serialization/deserialization support for Option<Either<L, R>>. 3 //! `Either` uses default, externally-tagged representation. 10 //! use either::Either; 16 //! #[serde(with = "either::serde_untagged_optional")] 17 //! inner: Option<Either<Vec<String>, HashMap<String, i32>>> 22 //! inner: Some(Either::Left(vec!["Hello".to_string()])) 40 enum Either<L, R> { enum 46 this: &Option<super::Either<L, R>>, in serialize() 55 Some(super::Either::Left(left)) => Some(Either::Left(left)), in serialize() 56 Some(super::Either::Right(right)) => Some(Either::Right(right)), in serialize() [all …]
|
D | into_either.rs | 2 //! size is constant and known at compile-time, into an [`Either`] variant. 4 use super::{Either, Left, Right}; 6 /// Provides methods for converting a type `Self` into either a [`Left`] or [`Right`] 7 /// variant of [`Either<Self, Self>`](Either). 15 /// Converts `self` into a [`Left`] variant of [`Either<Self, Self>`](Either) 17 /// Converts `self` into a [`Right`] variant of [`Either<Self, Self>`](Either) 23 /// use either::{IntoEither, Left, Right}; 29 fn into_either(self, into_left: bool) -> Either<Self, Self> { in into_either() 37 /// Converts `self` into a [`Left`] variant of [`Either<Self, Self>`](Either) 39 /// Converts `self` into a [`Right`] variant of [`Either<Self, Self>`](Either) [all …]
|
/aosp_15_r20/external/cronet/third_party/rust/chromium_crates_io/vendor/either-1.11.0/src/ |
H A D | lib.rs | 1 //! The enum [`Either`] with variants `Left` and `Right` is a general purpose 4 //! [`Either`]: enum.Either.html 12 //! Disabled by default. Enable to `#[derive(Serialize, Deserialize)]` for `Either` 15 #![doc(html_root_url = "https://docs.rs/either/1/")] 39 pub use crate::Either::{Left, Right}; 41 /// The enum `Either` with variants `Left` and `Right` is a general purpose 44 /// The `Either` type is symmetric and treats its variants the same way, without 49 pub enum Either<L, R> { enum 56 /// Evaluate the provided expression for both [`Either::Left`] and [`Either::Right`]. 58 /// This macro is useful in cases where both sides of [`Either`] can be interacted with [all …]
|
H A D | serde_untagged.rs | 1 //! Untagged serialization/deserialization support for Either<L, R>. 3 //! `Either` uses default, externally-tagged representation. 10 //! use either::Either; 16 //! #[serde(with = "either::serde_untagged")] 17 //! inner: Either<Vec<String>, HashMap<String, i32>> 22 //! inner: Either::Left(vec!["Hello".to_string()]) 40 enum Either<L, R> { enum 45 pub fn serialize<L, R, S>(this: &super::Either<L, R>, serializer: S) -> Result<S::Ok, S::Error> in serialize() 52 super::Either::Left(left) => Either::Left(left), in serialize() 53 super::Either::Right(right) => Either::Right(right), in serialize() [all …]
|
H A D | serde_untagged_optional.rs | 1 //! Untagged serialization/deserialization support for Option<Either<L, R>>. 3 //! `Either` uses default, externally-tagged representation. 10 //! use either::Either; 16 //! #[serde(with = "either::serde_untagged_optional")] 17 //! inner: Option<Either<Vec<String>, HashMap<String, i32>>> 22 //! inner: Some(Either::Left(vec!["Hello".to_string()])) 40 enum Either<L, R> { enum 46 this: &Option<super::Either<L, R>>, in serialize() 55 Some(super::Either::Left(left)) => Some(Either::Left(left)), in serialize() 56 Some(super::Either::Right(right)) => Some(Either::Right(right)), in serialize() [all …]
|
/aosp_15_r20/external/rust/android-crates-io/crates/futures-util/src/future/ |
D | either.rs | 13 /// use futures::future::Either; 19 /// Either::Left(async move { 12 }) 21 /// Either::Right(async move { 44 }) 28 pub enum Either<A, B> { enum 35 impl<A, B> Either<A, B> { impl 36 /// Convert `Pin<&Either<A, B>>` to `Either<Pin<&A>, Pin<&B>>`, 38 pub fn as_pin_ref(self: Pin<&Self>) -> Either<Pin<&A>, Pin<&B>> { in as_pin_ref() 43 Self::Left(inner) => Either::Left(Pin::new_unchecked(inner)), in as_pin_ref() 44 Self::Right(inner) => Either::Right(Pin::new_unchecked(inner)), in as_pin_ref() 49 /// Convert `Pin<&mut Either<A, B>>` to `Either<Pin<&mut A>, Pin<&mut B>>`, [all …]
|
/aosp_15_r20/external/aws-sdk-java-v2/utils/src/test/java/software/amazon/awssdk/utils/ |
H A D | EitherTest.java | 11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 29 Either.left(null); in leftValueNull_ThrowsException() 34 Either.right(null); in rightValueNull_ThrowsException() 39 final Either<String, Integer> either = Either.left("left val"); in mapWhenLeftValuePresent_OnlyCallsLeftFunction() local 40 final Boolean mapped = either.map(s -> { in mapWhenLeftValuePresent_OnlyCallsLeftFunction() 50 final Either<String, Integer> either = Either.right(42); in mapWhenRightValuePresent_OnlyCallsRightFunction() local 51 final Boolean mapped = either.map(this::assertNotCalled, in mapWhenRightValuePresent_OnlyCallsRightFunction() 62 final Either<String, Integer> either = Either.left(value); in mapLeftWhenLeftValuePresent_OnlyMapsLeftValue() local 63 either.mapLeft(String::hashCode) in mapLeftWhenLeftValuePresent_OnlyMapsLeftValue() 71 final Either<String, Integer> either = Either.right(value); in mapLeftWhenLeftValueNotPresent_DoesNotMapValue() local [all …]
|
/aosp_15_r20/frameworks/base/packages/SystemUI/utils/kairos/src/com/android/systemui/kairos/util/ |
H A D | Either.kt | 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 24 * [Either] generalizes sealed classes the same way that [Pair] generalizes data classes; if a 25 * [Pair] is effectively an anonymous grouping of two instances, then an [Either] is an anonymous 28 sealed class Either<out A, out B> class 30 /** An [Either] that contains a [Left] value. */ 31 data class Left<out A>(val value: A) : Either<A, Nothing>() 33 /** An [Either] that contains a [Right] value. */ 34 data class Right<out B>(val value: B) : Either<Nothing, B>() 37 * Returns an [Either] containing the result of applying [transform] to the [Left] value, or the 40 inline fun <A, B, C> Either<A, C>.mapLeft(transform: (A) -> B): Either<B, C> = in mapLeft() [all …]
|
/aosp_15_r20/external/aws-sdk-java-v2/utils/src/main/java/software/amazon/awssdk/utils/ |
H A D | Either.java | 11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 30 public final class Either<L, R> { class 35 private Either(Optional<L> l, Optional<R> r) { in Either() method in Either 41 …* Maps the Either to a type and returns the resolved value (which may be from the left or the righ… 46 * @return Mapped value from either lFunc or rFunc depending on which value is present. 55 * Map the left most value and return a new Either reflecting the new types. 59 * @return New Either bound to the new left type and the same right type. 61 public <T> Either<T, R> mapLeft(Function<? super L, ? extends T> lFunc) { in mapLeft() 62 return new Either<>(left.map(lFunc), right); in mapLeft() 66 * Map the right most value and return a new Either reflecting the new types. [all …]
|
/aosp_15_r20/external/tpm2-tss/doc/ |
H A D | doxygen.dox | 119 * either as a one-call or in an asynchronous manner. 127 * either as a one-call or in an asynchronous manner. 135 * either as a one-call or in an asynchronous manner. 143 * either as a one-call or in an asynchronous manner. 151 * either as a one-call or in an asynchronous manner. 159 * either as a one-call or in an asynchronous manner. 165 * either as a one-call or in an asynchronous manner. 175 * either as a one-call or in an asynchronous manner. 183 * either as a one-call or in an asynchronous manner. 191 * either as a one-call or in an asynchronous manner. [all …]
|
/aosp_15_r20/external/ms-tpm-20-ref/TPMCmd/tpm/include/ |
H A D | TpmBuildSwitches.h | 39 // The switches are guarded so that they can either be set on the command line or 43 // to the default value. The default can either be YES or NO as indicated on each line 51 // not be a proper expression If you want to test various switches, either use the 78 # define DEBUG YES // Default: Either YES or NO 87 # define USE_BN_ECC_DATA YES // Default: Either YES or NO 93 // debug code. SIMULATION Needs to be defined as either YES or NO. This grouping of 102 # define SIMULATION YES // Default: Either YES or NO 111 # define LIBRARY_COMPATIBILITY_CHECK YES // Default: Either YES or NO 116 # define FIPS_COMPLIANT YES // Default: Either YES or NO 123 # define USE_DA_USED YES // Default: Either YES or NO [all …]
|
/aosp_15_r20/external/mobile-data-download/javatests/com/google/android/libraries/mobiledatadownload/internal/util/ |
H A D | EitherTest.java | 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 30 // ImmutableList ensures the Either List isn't modified by sortedEquals. 39 assertThat(Either.sortedEquals(Either.makeLeft(LIST), Either.makeLeft(LIST), COMPARATOR)) in sortedEquals_comparesSortedList() 42 Either.sortedEquals(Either.makeLeft(LIST), Either.makeLeft(JUMBLED_LIST), COMPARATOR)) in sortedEquals_comparesSortedList() 45 assertThat(Either.sortedEquals(Either.makeLeft(LIST), Either.makeLeft(OTHER_LIST), COMPARATOR)) in sortedEquals_comparesSortedList() 51 assertThat(Either.sortedEquals(Either.makeLeft(LIST), null, COMPARATOR)).isFalse(); in sortedEquals_handlesNull() 52 assertThat(Either.sortedEquals(Either.makeLeft(LIST), Either.makeLeft(null), COMPARATOR)) in sortedEquals_handlesNull() 55 assertThat(Either.sortedEquals(Either.makeLeft(null), Either.makeLeft(null), COMPARATOR)) in sortedEquals_handlesNull() 57 assertThat(Either.sortedEquals(null, null, COMPARATOR)).isTrue(); in sortedEquals_handlesNull()
|
/aosp_15_r20/external/mobile-data-download/java/com/google/android/libraries/mobiledatadownload/internal/util/ |
H A D | Either.java | 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 25 /** An object that contains either one of the left field or right field, but not both. */ 26 public final class Either<A, B> { class 32 private Either(boolean hasLeft, @Nullable A left, @Nullable B right) { in Either() method in Either 38 public static <A, B> Either<A, B> makeLeft(A left) { in makeLeft() 39 return new Either<>(true, left, null); in makeLeft() 42 public static <A, B> Either<A, B> makeRight(B right) { in makeRight() 43 return new Either<>(false, null, right); in makeRight() 56 throw new IllegalStateException("Either was not left"); in getLeft() 63 throw new IllegalStateException("Either was not right"); in getRight() [all …]
|
/aosp_15_r20/external/rust/android-crates-io/crates/either/ |
D | README.rst | 2 Either title 5 The enum ``Either`` with variants ``Left`` and ``Right`` and trait 8 Either has methods that are similar to Option and Result. 15 __ https://docs.rs/either/ 19 .. |build_status| image:: https://github.com/rayon-rs/either/workflows/CI/badge.svg?branch=main 20 .. _build_status: https://github.com/rayon-rs/either/actions 22 .. |crates| image:: https://img.shields.io/crates/v/either.svg 23 .. _crates: https://crates.io/crates/either 28 either = "1.12" 40 - **MSRV**: ``either`` now requires Rust 1.37 or later. [all …]
|
/aosp_15_r20/external/kotlinx.serialization/formats/json-tests/commonTest/src/kotlinx/serialization/json/ |
H A D | JsonEncoderDecoderRecursiveTest.kt | 28 assertEquals(Either.Right(Payload(42, 43, "Hello world")), payload) in <lambda>() 38 assertEquals(Either.Left("Connection timed out"), payload) in <lambda>() 45 val outputData = Event(0, Either.Right(Payload(42, 43, "Hello world")), 1000) in <lambda>() 52 val outputData = Event(0, Either.Right(Payload(42, 43, "Hello world")), 1000) in <lambda>() 67 val outputError = Event(1, Either.Left("Connection timed out"), 1001) in <lambda>() 77 assertEquals(Either.Right(Payload(42, 43, "Hello world")), payload) in <lambda>() 87 assertEquals(Either.Left("Connection timed out"), payload) in <lambda>() 94 val outputData = Event(0, Either.Right(Payload(42, 43, "Hello world")), 1000) in <lambda>() 101 val outputError = Event(1, Either.Left("Connection timed out"), 1001) in <lambda>() 121 private sealed class Either { in <lambda>() class in kotlinx.serialization.json.JsonEncoderDecoderRecursiveTest [all …]
|
H A D | JsonTreeAndMapperTest.kt | 19 sealed class Either { class 20 data class Left(val errorMsg: String) : Either() 21 data class Right(val data: Payload) : Either() 24 object EitherSerializer : KSerializer<Either> { 25 …override val descriptor: SerialDescriptor = buildSerialDescriptor("Either", PolymorphicKind.SEALED… in <lambda>() 26 val leftDescriptor = buildClassSerialDescriptor("Either.Left") { in <lambda>() 29 val rightDescriptor = buildClassSerialDescriptor("Either.Right") { in <lambda>() 36 override fun deserialize(decoder: Decoder): Either { in deserialize() 40 if ("error" in tree) return Either.Left(tree.getValue("error").jsonPrimitive.content) in deserialize() 42 return Either.Right(input.json.decodeFromJsonElement(Payload.serializer(), tree)) in deserialize() [all …]
|
/aosp_15_r20/external/arm-trusted-firmware/plat/xilinx/zynqmp/pm_service/ |
H A D | pm_api_sys.c | 82 * @return Returns status, either success or error+reason 112 * @return Returns status, either success or error+reason 137 * This API function is either used to power up another APU core for SMP 142 * @return Returns status, either success or error+reason 173 * @return Returns status, either success or error+reason 197 * @return Returns status, either success or error+reason 221 * @return Returns status, either success or error+reason 239 * @return Returns status, either success or error+reason 264 * @return Returns status, either success or error+reason 290 * @return Returns status, either success or error+reason [all …]
|
/aosp_15_r20/external/rust/android-crates-io/crates/itertools/src/ |
D | merge_join.rs | 6 use either::Either; 115 // "merge" never returns (Some(...), Some(...), ...) so Option<Either<I::Item, J::Item>> 118 fn merge(&mut self, left: L, right: R) -> (Option<Either<L, R>>, Self::MergeResult); in merge() 130 fn merge(&mut self, left: L, right: R) -> (Option<Either<L, R>>, Self::MergeResult) { in merge() 133 Ordering::Less => (Some(Either::Right(right)), EitherOrBoth::Left(left)), in merge() 134 Ordering::Greater => (Some(Either::Left(left)), EitherOrBoth::Right(right)), in merge() 150 type MergeResult = Either<L, R>; 152 Either::Left(left) in left() 155 Either::Right(right) in right() 157 fn merge(&mut self, left: L, right: R) -> (Option<Either<L, R>>, Self::MergeResult) { in merge() [all …]
|
/aosp_15_r20/external/rust/android-crates-io/crates/tokio-util/src/ |
D | either.rs | 1 //! Module defining an Either type. 40 /// When the output type is the same, we can wrap each future in `Either` to avoid the 44 /// use tokio_util::either::Either; 52 /// Either::Left(some_async_function()) 54 /// Either::Right(other_async_function()) 64 pub enum Either<L, R> { enum 70 … It takes an invocation of method as an argument (e.g. `self.poll(cx)`), and redirects it to either 83 impl<L, R, O> Future for Either<L, R> implementation 95 impl<L, R> AsyncRead for Either<L, R> implementation 109 impl<L, R> AsyncBufRead for Either<L, R> implementation [all …]
|
/aosp_15_r20/external/arm-trusted-firmware/plat/xilinx/versal/pm_service/ |
H A D | pm_api_sys.c | 81 * @return Returns status, either success or error+reason 122 * @return Returns status, either success or error+reason 161 * @return Returns status, either success or error+reason 189 * @return Returns status, either success or error+reason 217 * This API function is either used to power up another APU core for SMP 222 * @return Returns status, either success or error+reason 245 * @return Returns status, either success or error+reason 265 * @return Returns status, either success or error+reason 287 * @return Returns status, either success or error+reason 309 * @return Returns status, either success or error+reason [all …]
|
/aosp_15_r20/external/cronet/third_party/rust/chromium_crates_io/vendor/either-1.11.0/ |
H A D | README.rst | 2 Either title 5 The enum ``Either`` with variants ``Left`` and ``Right`` and trait 8 Either has methods that are similar to Option and Result. 15 __ https://docs.rs/either/ 19 .. |build_status| image:: https://github.com/rayon-rs/either/workflows/CI/badge.svg?branch=main 20 .. _build_status: https://github.com/rayon-rs/either/actions 22 .. |crates| image:: https://img.shields.io/crates/v/either.svg 23 .. _crates: https://crates.io/crates/either 28 either = "1.11" 36 - Add new trait ``IntoEither`` that is useful to convert to ``Either`` in method chains, [all …]
|