Struct modality_ingest_client::IngestClient
source · [−]pub struct IngestClient<S> { /* private fields */ }Implementations
sourceimpl 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>
sourceimpl IngestClient<ReadyState>
impl IngestClient<ReadyState>
pub async fn open_timeline(
self,
id: TimelineId
) -> Result<IngestClient<BoundTimelineState>, IngestError>
pub async fn declare_attr_key(
&mut self,
key_name: String
) -> Result<InternedAttrKey, IngestError>
sourceimpl 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 declare_attr_key(
&mut self,
key_name: String
) -> Result<InternedAttrKey, IngestError>
pub async fn timeline_metadata(
&mut self,
attrs: impl IntoIterator<Item = (InternedAttrKey, AttrVal)>
) -> Result<(), IngestError>
pub async fn event(
&mut self,
ordering: u128,
attrs: impl IntoIterator<Item = (InternedAttrKey, AttrVal)>
) -> Result<(), IngestError>
pub async fn flush(&mut self) -> Result<(), IngestError>
pub async fn status(&mut self) -> Result<IngestStatus, IngestError>
Trait Implementations
sourceimpl From<IngestClient<BoundTimelineState>> for DynamicIngestClient
impl From<IngestClient<BoundTimelineState>> for DynamicIngestClient
sourcefn from(c: IngestClient<BoundTimelineState>) -> Self
fn from(c: IngestClient<BoundTimelineState>) -> Self
Converts to this type from the input type.
sourceimpl From<IngestClient<ReadyState>> for DynamicIngestClient
impl From<IngestClient<ReadyState>> for DynamicIngestClient
sourcefn from(c: IngestClient<ReadyState>) -> Self
fn from(c: IngestClient<ReadyState>) -> Self
Converts to this type from the input type.
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more