pub struct FieldMeta {
pub version: VersionRange,
pub nullable: Option<VersionRange>,
pub kind: KindMeta,
pub tag: Option<u32>,
pub tagged: Option<VersionRange>,
pub fields: &'static [(&'static str, &'static FieldMeta)],
}Expand description
Kafka API message field metadata
Fields§
§version: VersionRangeThe version range of this field.
nullable: Option<VersionRange>The version range where this field may be null.
kind: KindMetaThe kind (type) metadata of this field.
tag: Option<u32>When present the tag ID of this field.
tagged: Option<VersionRange>The range of versions where this field is tagged.
fields: &'static [(&'static str, &'static FieldMeta)]The fields contained within this structure.
Implementations§
Source§impl FieldMeta
impl FieldMeta
pub fn is_nullable(&self, version: i16) -> bool
pub fn is_mandatory(&self, parent: Option<VersionRange>) -> bool
pub fn is_structure(&self) -> bool
pub fn structures(&self) -> Vec<(&str, &FieldMeta)>
pub fn field(&self, name: &str) -> Option<&FieldMeta>
Trait Implementations§
Source§impl Ord for FieldMeta
impl Ord for FieldMeta
Source§impl PartialOrd for FieldMeta
impl PartialOrd for FieldMeta
impl Copy for FieldMeta
impl Eq for FieldMeta
impl StructuralPartialEq for FieldMeta
Auto Trait Implementations§
impl Freeze for FieldMeta
impl RefUnwindSafe for FieldMeta
impl Send for FieldMeta
impl Sync for FieldMeta
impl Unpin for FieldMeta
impl UnsafeUnpin for FieldMeta
impl UnwindSafe for FieldMeta
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