pub struct FieldDescriptor {
pub name: &'static str,
pub kind: DataKind,
pub nullable: bool,
pub description: Option<&'static str>,
}Expand description
Engine-agnostic field definition.
This replaces arrow::datatypes::Field in the Protocol trait,
allowing protocol parsers to be used with any SQL backend.
Fields§
§name: &'static strField name (snake_case, e.g., “src_port”)
kind: DataKindData type
nullable: boolWhether the field can be NULL
description: Option<&'static str>Optional description for documentation
Implementations§
Source§impl FieldDescriptor
impl FieldDescriptor
Sourcepub const fn with_description(self, desc: &'static str) -> Self
pub const fn with_description(self, desc: &'static str) -> Self
Add a description to the field.
Sourcepub const fn set_nullable(self, nullable: bool) -> Self
pub const fn set_nullable(self, nullable: bool) -> Self
Builder: set nullability.
Source§impl FieldDescriptor
Helper macros for common field patterns.
impl FieldDescriptor
Helper macros for common field patterns.
Sourcepub const fn frame_number() -> Self
pub const fn frame_number() -> Self
Frame number field (present in all protocol tables).
Sourcepub const fn ipv4_field(name: &'static str) -> Self
pub const fn ipv4_field(name: &'static str) -> Self
IPv4 address field (stored as UInt32).
Sourcepub const fn ipv6_field(name: &'static str) -> Self
pub const fn ipv6_field(name: &'static str) -> Self
IPv6 address field (stored as 16-byte binary).
Trait Implementations§
Source§impl Clone for FieldDescriptor
impl Clone for FieldDescriptor
Source§fn clone(&self) -> FieldDescriptor
fn clone(&self) -> FieldDescriptor
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FieldDescriptor
impl Debug for FieldDescriptor
Source§impl PartialEq for FieldDescriptor
impl PartialEq for FieldDescriptor
impl StructuralPartialEq for FieldDescriptor
Auto Trait Implementations§
impl Freeze for FieldDescriptor
impl RefUnwindSafe for FieldDescriptor
impl Send for FieldDescriptor
impl Sync for FieldDescriptor
impl Unpin for FieldDescriptor
impl UnwindSafe for FieldDescriptor
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