pub trait OneshotSource:
Clone
+ Send
+ Unpin {
type Object: OneshotObject + Debug + Clone + Send + Unpin + Serialize + DeserializeOwned + 'static;
type Checksum: Debug + Clone + Send + Unpin + Serialize + DeserializeOwned + 'static;
// Required methods
fn list<'a>(
&'a self,
) -> impl Future<Output = Result<Vec<(Self::Object, Self::Checksum)>, StorageErrorX>> + Send;
fn get<'s>(
&'s self,
object: Self::Object,
checksum: Self::Checksum,
range: Option<RangeInclusive<usize>>,
) -> BoxStream<'s, Result<Bytes, StorageErrorX>>;
}
Expand description
Defines a remote system that we can fetch data from for a “one time” ingestion.
Required Associated Types§
Sourcetype Object: OneshotObject + Debug + Clone + Send + Unpin + Serialize + DeserializeOwned + 'static
type Object: OneshotObject + Debug + Clone + Send + Unpin + Serialize + DeserializeOwned + 'static
An individual unit within the source, e.g. a file.
Sourcetype Checksum: Debug + Clone + Send + Unpin + Serialize + DeserializeOwned + 'static
type Checksum: Debug + Clone + Send + Unpin + Serialize + DeserializeOwned + 'static
Checksum for a Self::Object
.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.