pub enum OffsetMode {
Offset(i64),
OffsetExpr(Box<Expression>),
}
Expand description
Note: A oneof field is inherently optional, whereas individual fields within a oneof cannot be marked as optional. The unset state of offset should therefore be checked at the oneof level. Unset is treated as 0.
Variants§
Offset(i64)
the offset expressed in number of records
Deprecated: use offset_expr
instead
OffsetExpr(Box<Expression>)
Expression evaluated into a non-negative integer specifying the number of records to skip. An expression evaluating to null is treated as 0. Evaluating to a negative integer should result in an error. Recommended type for offset is int64.
Implementations§
Source§impl OffsetMode
impl OffsetMode
Sourcepub fn merge(
field: &mut Option<OffsetMode>,
tag: u32,
wire_type: WireType,
buf: &mut impl Buf,
ctx: DecodeContext,
) -> Result<(), DecodeError>
pub fn merge( field: &mut Option<OffsetMode>, tag: u32, wire_type: WireType, buf: &mut impl Buf, ctx: DecodeContext, ) -> Result<(), DecodeError>
Decodes an instance of the message from a buffer, and merges it into self.
Sourcepub fn encoded_len(&self) -> usize
pub fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Trait Implementations§
Source§impl Clone for OffsetMode
impl Clone for OffsetMode
Source§fn clone(&self) -> OffsetMode
fn clone(&self) -> OffsetMode
Returns a copy 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 OffsetMode
impl Debug for OffsetMode
Source§impl PartialEq for OffsetMode
impl PartialEq for OffsetMode
impl StructuralPartialEq for OffsetMode
Auto Trait Implementations§
impl Freeze for OffsetMode
impl RefUnwindSafe for OffsetMode
impl Send for OffsetMode
impl Sync for OffsetMode
impl Unpin for OffsetMode
impl UnwindSafe for OffsetMode
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