Struct modality_ingest_client::client::IngestClient
source · pub struct IngestClient<S> { /* private fields */ }
Implementations§
source§impl IngestClient<UnauthenticatedState>
impl IngestClient<UnauthenticatedState>
sourcepub async fn connect(
endpoint: &Url,
allow_insecure_tls: bool,
) -> Result<IngestClient<UnauthenticatedState>, IngestClientInitializationError>
pub async fn connect( endpoint: &Url, allow_insecure_tls: bool, ) -> Result<IngestClient<UnauthenticatedState>, IngestClientInitializationError>
Create a new ingest client.
pub async fn authenticate( self, token: Vec<u8>, ) -> Result<IngestClient<ReadyState>, IngestError>
source§impl IngestClient<ReadyState>
impl IngestClient<ReadyState>
pub async fn open_timeline( self, id: TimelineId, ) -> Result<IngestClient<BoundTimelineState>, IngestError>
pub async fn attr_key( &mut self, key_name: String, ) -> Result<AttrKey, IngestError>
source§impl IngestClient<BoundTimelineState>
impl IngestClient<BoundTimelineState>
pub fn bound_timeline(&self) -> TimelineId
pub async fn open_timeline(&mut self, id: TimelineId) -> Result<(), IngestError>
sourcepub fn close_timeline(self) -> IngestClient<ReadyState>
pub fn close_timeline(self) -> IngestClient<ReadyState>
This doesn’t change the connection state, but it does require you to open_timeline again before you can do anything else.
pub async fn attr_key( &mut self, key_name: String, ) -> Result<AttrKey, IngestError>
pub async fn timeline_metadata( &mut self, attrs: impl IntoIterator<Item = (AttrKey, AttrVal)>, ) -> Result<(), IngestError>
pub async fn event( &mut self, ordering: u128, attrs: impl IntoIterator<Item = (AttrKey, AttrVal)>, ) -> Result<(), IngestError>
pub async fn flush(&mut self) -> Result<(), IngestError>
pub async fn status(&mut self) -> Result<IngestStatus, IngestError>
Auto Trait Implementations§
impl<S> !Freeze for IngestClient<S>
impl<S> RefUnwindSafe for IngestClient<S>where
S: RefUnwindSafe,
impl<S> Send for IngestClient<S>where
S: Send,
impl<S> Sync for IngestClient<S>where
S: Sync,
impl<S> Unpin for IngestClient<S>where
S: Unpin,
impl<S> UnwindSafe for IngestClient<S>where
S: UnwindSafe,
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