pub trait DestinationPartition<'a>: Send {
type TypeSystem: TypeSystem;
type Error: From<ConnectorXError> + Send;
// Required methods
fn ncols(&self) -> usize;
fn finalize(&mut self) -> Result<(), Self::Error>;
fn aquire_row(&mut self, n: usize) -> Result<usize, Self::Error>;
// Provided method
fn write<T>(
&mut self,
value: T,
) -> Result<(), <Self as DestinationPartition<'a>>::Error>
where T: TypeAssoc<Self::TypeSystem>,
Self: Consume<T, Error = <Self as DestinationPartition<'a>>::Error> { ... }
}
Expand description
PartitionDestination
writes values to its own region. PartitionDestination
is parameterized
on lifetime 'a
, which is the lifetime of the parent Destination
. Usually,
a PartitionDestination
can never live longer than the parent.
Required Associated Types§
type TypeSystem: TypeSystem
type Error: From<ConnectorXError> + Send
Required Methods§
Provided Methods§
sourcefn write<T>(
&mut self,
value: T,
) -> Result<(), <Self as DestinationPartition<'a>>::Error>where
T: TypeAssoc<Self::TypeSystem>,
Self: Consume<T, Error = <Self as DestinationPartition<'a>>::Error>,
fn write<T>(
&mut self,
value: T,
) -> Result<(), <Self as DestinationPartition<'a>>::Error>where
T: TypeAssoc<Self::TypeSystem>,
Self: Consume<T, Error = <Self as DestinationPartition<'a>>::Error>,
Write a value of type T to the location (row, col). If T mismatch with the
schema, ConnectorXError::TypeCheckFailed
will return.
Object Safety§
This trait is not object safe.