pub struct ListBuildingsUseCase { /* private fields */ }Implementations§
Source§impl ListBuildingsUseCase
impl ListBuildingsUseCase
pub fn new( building_repo: Arc<dyn BuildingRepository>, acp_repo: Arc<dyn AcpRepository>, ) -> Self
Sourcepub async fn list_for_scope(
&self,
page_request: &PageRequest,
scope: ListScope,
) -> Result<(Vec<BuildingResponseDto>, i64), AppError>
pub async fn list_for_scope( &self, page_request: &PageRequest, scope: ListScope, ) -> Result<(Vec<BuildingResponseDto>, i64), AppError>
List buildings filtered by scope (caller-derived).
Returns 422 / Validation if the caller supplied a scope that
can’t be resolved (e.g. AcpScope with an unknown ACP id).
Sourcepub async fn list_for_acp(
&self,
page_request: &PageRequest,
acp_id: Uuid,
) -> Result<(Vec<BuildingResponseDto>, i64), AppError>
pub async fn list_for_acp( &self, page_request: &PageRequest, acp_id: Uuid, ) -> Result<(Vec<BuildingResponseDto>, i64), AppError>
Resolve a per-ACP scope (used by scope_guard middleware once a
X-Scope-AcpId header is present). Looks up the ACP’s
organization_id and applies that as the filter.
Auto Trait Implementations§
impl !RefUnwindSafe for ListBuildingsUseCase
impl !UnwindSafe for ListBuildingsUseCase
impl Freeze for ListBuildingsUseCase
impl Send for ListBuildingsUseCase
impl Sync for ListBuildingsUseCase
impl Unpin for ListBuildingsUseCase
impl UnsafeUnpin for ListBuildingsUseCase
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§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.