pub struct Max<T>(pub T);Expand description
Re-export Max from algebra.
Newtype wrapper for an Ord type where join is max.
join = max(a, b)bottom = T::MIN(when T: Bounded)
§Example
use algebra::JoinSemilattice;
use algebra::Max;
let a = Max(5);
let b = Max(10);
assert_eq!(a.join(&b), Max(10));Tuple Fields§
§0: TImplementations§
Trait Implementations§
Source§impl<T> BoundedJoinSemilattice for Max<T>
impl<T> BoundedJoinSemilattice for Max<T>
Source§fn join_all_from_bottom<I>(it: I) -> Selfwhere
I: IntoIterator<Item = Self>,
fn join_all_from_bottom<I>(it: I) -> Selfwhere
I: IntoIterator<Item = Self>,
Join a finite iterator of values, starting from ⊥. Read more
Source§impl<'de, T> Deserialize<'de> for Max<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Max<T>where
T: Deserialize<'de>,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Max<T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Max<T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T> JoinSemilattice for Max<T>
impl<T> JoinSemilattice for Max<T>
Source§fn join_assign(&mut self, other: &Self)
fn join_assign(&mut self, other: &Self)
In-place variant.
Source§fn leq(&self, other: &Self) -> boolwhere
Self: PartialEq,
fn leq(&self, other: &Self) -> boolwhere
Self: PartialEq,
Derived partial order: x ≤ y iff x ⊔ y = y.
Source§fn join_all<I>(it: I) -> Option<Self>where
I: IntoIterator<Item = Self>,
fn join_all<I>(it: I) -> Option<Self>where
I: IntoIterator<Item = Self>,
Join a finite iterator of values. Returns
None for empty
iterators.Source§impl<T> Named for Max<T>where
T: Named,
impl<T> Named for Max<T>where
T: Named,
Source§fn typename() -> &'static str
fn typename() -> &'static str
The globally unique type name for the type.
This should typically be the fully qualified Rust name of the type.
Source§fn typehash() -> u64
fn typehash() -> u64
A globally unique hash for this type.
TODO: actually enforce perfect hashing
Source§fn typeid() -> TypeId
fn typeid() -> TypeId
The TypeId for this type. TypeIds are unique only within a binary,
and should not be used for global identification.
Source§fn port() -> u64
fn port() -> u64
The globally unique port for this type. Typed ports are in the range
of 1<<63..1<<64-1.
Source§impl<T> Ord for Max<T>where
T: Ord,
impl<T> Ord for Max<T>where
T: Ord,
Source§impl<T> PartialOrd for Max<T>where
T: PartialOrd,
impl<T> PartialOrd for Max<T>where
T: PartialOrd,
Source§impl<T> Serialize for Max<T>where
T: Serialize,
impl<T> Serialize for Max<T>where
T: Serialize,
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<T> Copy for Max<T>where
T: Copy,
impl<T> Eq for Max<T>where
T: Eq,
impl<T> StructuralPartialEq for Max<T>
Auto Trait Implementations§
impl<T> Freeze for Max<T>where
T: Freeze,
impl<T> RefUnwindSafe for Max<T>where
T: RefUnwindSafe,
impl<T> Send for Max<T>where
T: Send,
impl<T> Sync for Max<T>where
T: Sync,
impl<T> Unpin for Max<T>where
T: Unpin,
impl<T> UnwindSafe for Max<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Checkpointable for Twhere
T: RemoteMessage + Clone,
impl<T> Checkpointable for Twhere
T: RemoteMessage + Clone,
Source§type State = T
type State = T
The type of the state that is saved. The state can be serialized and deserialized
from persistent storage.
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<A, M> Handler<IndexedErasedUnbound<M>> for A
impl<A, M> Handler<IndexedErasedUnbound<M>> for A
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].