Skip to main content

ColumnIpv4

Struct ColumnIpv4 

Source
pub struct ColumnIpv4 { /* private fields */ }
Expand description

Column for IPv4 addresses (stored as UInt32)

C++ Implementation Pattern: Uses delegation to ColumnUInt32 for storage, matching the C++ clickhouse-cpp reference implementation’s std::shared_ptr<ColumnUInt32> data_ pattern.

Implementations§

Source§

impl ColumnIpv4

Source

pub fn new(type_: Type) -> Self

Create a new empty IPv4 column.

Source

pub fn with_data(self, data: Vec<u32>) -> Self

Set the column data from a vector of raw u32 IPv4 addresses.

Source

pub fn append_from_string(&mut self, s: &str) -> Result<()>

Append an IPv4 address parsed from a dotted-decimal string like "192.168.1.1".

§Errors

Returns an error if the string does not contain exactly four dot-separated octets or an octet is not a valid u8.

Source

pub fn append(&mut self, value: u32)

Append IPv4 from u32 value

Source

pub fn at(&self, index: usize) -> u32

Get IPv4 at index as u32

Source

pub fn as_string(&self, index: usize) -> String

Format IPv4 at index as dotted decimal string

Source

pub fn len(&self) -> usize

Returns the number of values in this column.

Source

pub fn is_empty(&self) -> bool

Returns true if the column contains no values.

Source

pub fn data(&self) -> &ColumnUInt32

Get reference to underlying data column (for advanced use).

Trait Implementations§

Source§

impl Column for ColumnIpv4

Source§

fn column_type(&self) -> &Type

Get the type of this column
Source§

fn size(&self) -> usize

Get the number of rows in this column
Source§

fn clear(&mut self)

Clear all data from the column
Source§

fn reserve(&mut self, new_cap: usize)

Reserve capacity for at least new_cap elements
Source§

fn append_column(&mut self, other: ColumnRef) -> Result<()>

Append another column’s data to this column
Source§

fn load_from_buffer(&mut self, buffer: &mut &[u8], rows: usize) -> Result<()>

Load column data from byte buffer
Source§

fn save_to_buffer(&self, buffer: &mut BytesMut) -> Result<()>

Save column data to byte buffer
Source§

fn clone_empty(&self) -> ColumnRef

Create an empty clone of this column (same type, no data)
Source§

fn slice(&self, begin: usize, len: usize) -> Result<ColumnRef>

Create a slice of this column
Source§

fn as_any(&self) -> &dyn Any

Downcast to a concrete column type
Source§

fn as_any_mut(&mut self) -> &mut dyn Any

Downcast to a mutable concrete column type
Source§

fn load_prefix(&mut self, _buffer: &mut &[u8], _rows: usize) -> Result<()>

Load column prefix from byte buffer (for types that need prefix data) Default implementation is a no-op. Override for types like LowCardinality. This matches C++ clickhouse-cpp’s LoadPrefix pattern.
Source§

fn save_prefix(&self, _buffer: &mut BytesMut) -> Result<()>

Save column prefix to byte buffer (for types that need prefix data) Default implementation is a no-op. Override for types like LowCardinality, Array with special nested types. This matches C++ clickhouse-cpp’s SavePrefix pattern.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more