pub struct FieldKey<T> { /* private fields */ }Expand description
Opaque catalog key for a context field of marker type T.
Keys are copyable handles to immutable schemas. They can be obtained only
from fields, preventing callers from inventing names or changing field
visibility.
ⓘ
use std::marker::PhantomData;
use rocketmq_error::{fields, FieldKey, TextField};
let _: FieldKey<TextField> = FieldKey {
schema: fields::TOPIC.schema(),
marker: PhantomData,
};ⓘ
use rocketmq_error::{fields, FieldKey, TextField};
let _: FieldKey<TextField> = FieldKey::new(fields::TOPIC.schema());Implementations§
Trait Implementations§
impl<T> Copy for FieldKey<T>
impl<T: Eq> Eq for FieldKey<T>
Source§impl<T: Ord> Ord for FieldKey<T>
impl<T: Ord> Ord for FieldKey<T>
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl<T: PartialOrd> PartialOrd for FieldKey<T>
impl<T: PartialOrd> PartialOrd for FieldKey<T>
impl<T: PartialEq> StructuralPartialEq for FieldKey<T>
Auto Trait Implementations§
impl<T> Freeze for FieldKey<T>
impl<T> RefUnwindSafe for FieldKey<T>
impl<T> Send for FieldKey<T>
impl<T> Sync for FieldKey<T>
impl<T> Unpin for FieldKey<T>
impl<T> UnsafeUnpin for FieldKey<T>
impl<T> UnwindSafe for FieldKey<T>
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