pub struct Protocol {
pub min_reader_version: i32,
pub min_writer_version: i32,
pub reader_features: Option<HashSet<ReaderFeatures>>,
pub writer_features: Option<HashSet<WriterFeatures>>,
}
Expand description
Defines a protocol action
Fields§
§min_reader_version: i32
The minimum version of the Delta read protocol that a client must implement in order to correctly read this table
min_writer_version: i32
The minimum version of the Delta write protocol that a client must implement in order to correctly write this table
reader_features: Option<HashSet<ReaderFeatures>>
A collection of features that a client must implement in order to correctly read this table (exist only when minReaderVersion is set to 3)
writer_features: Option<HashSet<WriterFeatures>>
A collection of features that a client must implement in order to correctly write this table (exist only when minWriterVersion is set to 7)
Implementations§
source§impl Protocol
impl Protocol
sourcepub fn new(min_reader_version: i32, min_wrriter_version: i32) -> Protocol
pub fn new(min_reader_version: i32, min_wrriter_version: i32) -> Protocol
Create a new protocol action
sourcepub fn with_reader_features(
self,
reader_features: impl IntoIterator<Item = impl Into<ReaderFeatures>>
) -> Protocol
pub fn with_reader_features( self, reader_features: impl IntoIterator<Item = impl Into<ReaderFeatures>> ) -> Protocol
set the reader features in the protocol action
sourcepub fn with_writer_features(
self,
writer_features: impl IntoIterator<Item = impl Into<WriterFeatures>>
) -> Protocol
pub fn with_writer_features( self, writer_features: impl IntoIterator<Item = impl Into<WriterFeatures>> ) -> Protocol
set the writer features in the protocol action
Trait Implementations§
source§impl<'de> Deserialize<'de> for Protocol
impl<'de> Deserialize<'de> for Protocol
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<Protocol, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Protocol, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for Protocol
impl PartialEq for Protocol
source§impl Serialize for Protocol
impl Serialize for Protocol
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 Eq for Protocol
impl StructuralPartialEq for Protocol
Auto Trait Implementations§
impl Freeze for Protocol
impl RefUnwindSafe for Protocol
impl Send for Protocol
impl Sync for Protocol
impl Unpin for Protocol
impl UnwindSafe for Protocol
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§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 moreCreates a shared type from an unshared type.