pub struct CaepTransmitter { /* private fields */ }Expand description
CAEP event transmitter — manages streams and dispatches events.
Implementations§
Source§impl CaepTransmitter
impl CaepTransmitter
pub fn new(issuer: &str) -> Self
Sourcepub async fn create_stream(&self, config: StreamConfig) -> String
pub async fn create_stream(&self, config: StreamConfig) -> String
Register a new event stream. Returns the stream ID.
Sourcepub async fn get_stream_config(&self, stream_id: &str) -> Option<StreamConfig>
pub async fn get_stream_config(&self, stream_id: &str) -> Option<StreamConfig>
Get stream configuration.
Sourcepub async fn set_stream_status(
&self,
stream_id: &str,
status: StreamStatus,
) -> Result<()>
pub async fn set_stream_status( &self, stream_id: &str, status: StreamStatus, ) -> Result<()>
Update stream status.
Sourcepub async fn get_stream_status(&self, stream_id: &str) -> Option<StreamStatus>
pub async fn get_stream_status(&self, stream_id: &str) -> Option<StreamStatus>
Get stream status.
Sourcepub async fn delete_stream(&self, stream_id: &str) -> bool
pub async fn delete_stream(&self, stream_id: &str) -> bool
Delete a stream.
Sourcepub async fn emit_session_revoked(
&self,
subject: SubjectIdentifier,
reason: Option<&str>,
) -> Result<CaepEvent>
pub async fn emit_session_revoked( &self, subject: SubjectIdentifier, reason: Option<&str>, ) -> Result<CaepEvent>
Emit a session-revoked event to all enabled streams.
Sourcepub async fn emit_credential_change(
&self,
subject: SubjectIdentifier,
change_type: ChangeType,
) -> Result<CaepEvent>
pub async fn emit_credential_change( &self, subject: SubjectIdentifier, change_type: ChangeType, ) -> Result<CaepEvent>
Emit a credential-change event.
Sourcepub async fn emit_device_compliance_change(
&self,
subject: SubjectIdentifier,
previous_status: &str,
current_status: &str,
) -> Result<CaepEvent>
pub async fn emit_device_compliance_change( &self, subject: SubjectIdentifier, previous_status: &str, current_status: &str, ) -> Result<CaepEvent>
Emit a device-compliance-change event.
Sourcepub async fn emit_token_claims_change(
&self,
subject: SubjectIdentifier,
claims: HashMap<String, Value>,
) -> Result<CaepEvent>
pub async fn emit_token_claims_change( &self, subject: SubjectIdentifier, claims: HashMap<String, Value>, ) -> Result<CaepEvent>
Emit a token-claims-change event.
Signals that one or more claims in a previously issued token have changed.
Sourcepub async fn emit_assurance_level_change(
&self,
subject: SubjectIdentifier,
current_level: &str,
previous_level: &str,
change_direction: &str,
) -> Result<CaepEvent>
pub async fn emit_assurance_level_change( &self, subject: SubjectIdentifier, current_level: &str, previous_level: &str, change_direction: &str, ) -> Result<CaepEvent>
Emit an assurance-level-change event.
Signals that the authentication assurance level for a subject has changed.
Sourcepub async fn poll_events(&self, stream_id: &str) -> Result<Vec<CaepEvent>>
pub async fn poll_events(&self, stream_id: &str) -> Result<Vec<CaepEvent>>
Poll events for a stream (for pull-based delivery).
Sourcepub async fn active_stream_count(&self) -> usize
pub async fn active_stream_count(&self) -> usize
Count active (enabled) streams.
Auto Trait Implementations§
impl Freeze for CaepTransmitter
impl !RefUnwindSafe for CaepTransmitter
impl Send for CaepTransmitter
impl Sync for CaepTransmitter
impl Unpin for CaepTransmitter
impl UnsafeUnpin for CaepTransmitter
impl !UnwindSafe for CaepTransmitter
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more