pub struct ConsumerRegistry { /* private fields */ }๐Deprecated:
Will be extracted to mockforge-contracts crate
Expand description
Registry for tracking consumers
Implementationsยง
Sourceยงimpl ConsumerRegistry
impl ConsumerRegistry
Sourcepub fn new() -> Self
๐Deprecated: Will be extracted to mockforge-contracts crate
pub fn new() -> Self
Will be extracted to mockforge-contracts crate
Create a new consumer registry
Sourcepub async fn register(&self, consumer: Consumer)
๐Deprecated: Will be extracted to mockforge-contracts crate
pub async fn register(&self, consumer: Consumer)
Will be extracted to mockforge-contracts crate
Register a consumer
Sourcepub async fn get_by_id(&self, id: &str) -> Option<Consumer>
๐Deprecated: Will be extracted to mockforge-contracts crate
pub async fn get_by_id(&self, id: &str) -> Option<Consumer>
Will be extracted to mockforge-contracts crate
Get consumer by ID
Sourcepub async fn get_by_identifier(
&self,
identifier: &ConsumerIdentifier,
) -> Option<Consumer>
๐Deprecated: Will be extracted to mockforge-contracts crate
pub async fn get_by_identifier( &self, identifier: &ConsumerIdentifier, ) -> Option<Consumer>
Will be extracted to mockforge-contracts crate
Get consumer by identifier
Sourcepub async fn list_all(&self) -> Vec<Consumer>
๐Deprecated: Will be extracted to mockforge-contracts crate
pub async fn list_all(&self) -> Vec<Consumer>
Will be extracted to mockforge-contracts crate
List all consumers
Sourcepub async fn remove(&self, id: &str) -> Option<Consumer>
๐Deprecated: Will be extracted to mockforge-contracts crate
pub async fn remove(&self, id: &str) -> Option<Consumer>
Will be extracted to mockforge-contracts crate
Remove a consumer
Sourcepub async fn get_or_create(
&self,
identifier: ConsumerIdentifier,
name: String,
workspace_id: Option<String>,
) -> Consumer
๐Deprecated: Will be extracted to mockforge-contracts crate
pub async fn get_or_create( &self, identifier: ConsumerIdentifier, name: String, workspace_id: Option<String>, ) -> Consumer
Will be extracted to mockforge-contracts crate
Create or get consumer by identifier
Trait Implementationsยง
Sourceยงimpl Clone for ConsumerRegistry
impl Clone for ConsumerRegistry
Sourceยงfn clone(&self) -> ConsumerRegistry
fn clone(&self) -> ConsumerRegistry
Returns a duplicate of the value. Read more
1.0.0 ยท Sourceยงfn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSourceยงimpl Debug for ConsumerRegistry
impl Debug for ConsumerRegistry
Auto Trait Implementationsยง
impl Freeze for ConsumerRegistry
impl !RefUnwindSafe for ConsumerRegistry
impl Send for ConsumerRegistry
impl Sync for ConsumerRegistry
impl Unpin for ConsumerRegistry
impl UnsafeUnpin for ConsumerRegistry
impl !UnwindSafe for ConsumerRegistry
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
Sourceยงimpl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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