pub struct SubjectSourceHandle(/* private fields */);Expand description
A subject source bound after the providers that read it are built.
Providers are discovered from a context that must already carry a source,
and one provider may itself consume the set. The handle breaks that cycle:
it is created first, handed to every factory, and bound once the set exists.
Before binding every read fails with SubjectSourceError::NotReady
rather than answering from an empty set.
Implementations§
Source§impl SubjectSourceHandle
impl SubjectSourceHandle
pub fn bind( &self, source: Arc<dyn SubjectAttributeSource>, ) -> Result<(), AlreadyBound>
Trait Implementations§
Source§impl Clone for SubjectSourceHandle
impl Clone for SubjectSourceHandle
Source§impl Debug for SubjectSourceHandle
impl Debug for SubjectSourceHandle
Source§impl Default for SubjectSourceHandle
impl Default for SubjectSourceHandle
Source§impl SubjectAttributeSource for SubjectSourceHandle
impl SubjectAttributeSource for SubjectSourceHandle
fn dimensions(&self) -> &[SubjectDimension]
fn values_for<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user: &'life1 UserId,
dimension: &'life2 SubjectDimension,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, SubjectSourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn resolve_all<'life0, 'life1, 'async_trait>(
&'life0 self,
user: &'life1 UserId,
) -> Pin<Box<dyn Future<Output = Result<SubjectAttributes, SubjectSourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Auto Trait Implementations§
impl !RefUnwindSafe for SubjectSourceHandle
impl !UnwindSafe for SubjectSourceHandle
impl Freeze for SubjectSourceHandle
impl Send for SubjectSourceHandle
impl Sync for SubjectSourceHandle
impl Unpin for SubjectSourceHandle
impl UnsafeUnpin for SubjectSourceHandle
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