Struct fluvio_smartmodule::dataplane::smartmodule::SmartModuleInput
source · pub struct SmartModuleInput { /* private fields */ }
Expand description
A single SmartModule input record
Implementations§
source§impl SmartModuleInput
impl SmartModuleInput
pub fn new( raw_bytes: Vec<u8>, base_offset: Offset, base_timestamp: Timestamp ) -> Self
pub fn base_offset(&self) -> Offset
pub fn set_base_offset(&mut self, base_offset: Offset)
pub fn base_timestamp(&self) -> Timestamp
pub fn set_base_timestamp(&mut self, base_timestamp: Timestamp)
pub fn raw_bytes(&self) -> &[u8] ⓘ
pub fn into_raw_bytes(self) -> Vec<u8> ⓘ
pub fn parts(self) -> (Vec<u8>, Vec<u8>)
sourcepub fn try_into_records(self, version: Version) -> Result<Vec<Record>, Error>
👎Deprecated: use SmartModuleRecord instead. Read more here: https://www.fluvio.io/smartmodules/smdk/smartmodulerecord/.
pub fn try_into_records(self, version: Version) -> Result<Vec<Record>, Error>
Creates an instance of Record
from the raw bytes and ignoring the
base offset and timestamp. This method is used to keep backwards
compatibility with SmartModule engines previous to Version 21
.
sourcepub fn try_into_smartmodule_records(
self,
version: Version
) -> Result<Vec<SmartModuleRecord>, Error>
pub fn try_into_smartmodule_records( self, version: Version ) -> Result<Vec<SmartModuleRecord>, Error>
Attempts to map the internally encoded records into a vector of
SmartModuleRecord
by decoding the raw bytes and filling up the base
offset and timestamp fields.
Trait Implementations§
source§impl Clone for SmartModuleInput
impl Clone for SmartModuleInput
source§fn clone(&self) -> SmartModuleInput
fn clone(&self) -> SmartModuleInput
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 SmartModuleInput
impl Debug for SmartModuleInput
source§impl Decoder for SmartModuleInput
impl Decoder for SmartModuleInput
source§impl Default for SmartModuleInput
impl Default for SmartModuleInput
source§fn default() -> SmartModuleInput
fn default() -> SmartModuleInput
Returns the “default value” for a type. Read more
source§impl Display for SmartModuleInput
impl Display for SmartModuleInput
source§impl Encoder for SmartModuleInput
impl Encoder for SmartModuleInput
Auto Trait Implementations§
impl RefUnwindSafe for SmartModuleInput
impl Send for SmartModuleInput
impl Sync for SmartModuleInput
impl Unpin for SmartModuleInput
impl UnwindSafe for SmartModuleInput
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