pub struct ConsentUseCases { /* private fields */ }Implementations§
Source§impl ConsentUseCases
impl ConsentUseCases
pub fn new( consent_repository: Arc<dyn ConsentRepository>, audit_repository: Arc<dyn AuditLogRepository>, ) -> Self
Sourcepub async fn record_consent(
&self,
user_id: Uuid,
organization_id: Uuid,
consent_type: &str,
ip_address: Option<String>,
user_agent: Option<String>,
policy_version: Option<String>,
) -> Result<ConsentRecordedResponse, String>
pub async fn record_consent( &self, user_id: Uuid, organization_id: Uuid, consent_type: &str, ip_address: Option<String>, user_agent: Option<String>, policy_version: Option<String>, ) -> Result<ConsentRecordedResponse, String>
Record user consent (GDPR Art. 7)
Creates an immutable consent record with full audit trail.
Sourcepub async fn get_consent_status(
&self,
user_id: Uuid,
) -> Result<ConsentStatusResponse, String>
pub async fn get_consent_status( &self, user_id: Uuid, ) -> Result<ConsentStatusResponse, String>
Get consent status for a user
Returns summary of privacy policy and terms acceptance.
Auto Trait Implementations§
impl Freeze for ConsentUseCases
impl !RefUnwindSafe for ConsentUseCases
impl Send for ConsentUseCases
impl Sync for ConsentUseCases
impl Unpin for ConsentUseCases
impl !UnwindSafe for ConsentUseCases
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
§impl<T> Chain<T> for T
impl<T> Chain<T> for T
§impl<T> Fake for T
impl<T> Fake for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 moreCreates a shared type from an unshared type.