Struct travel::interface::travel_interface::TravelInterface
source · pub struct TravelInterface {
travel_use_case: TravelUseCasesInteractor<TravelRepositoryConcrete>,
todo_use_case: TodoUseCaseInstractor<TravelRepositoryConcrete, TodoRepositoryConcrete, TodoIdServiceConcrete>,
}
Fields§
§travel_use_case: TravelUseCasesInteractor<TravelRepositoryConcrete>
§todo_use_case: TodoUseCaseInstractor<TravelRepositoryConcrete, TodoRepositoryConcrete, TodoIdServiceConcrete>
Implementations§
source§impl TravelInterface
impl TravelInterface
pub async fn new() -> Self
sourcepub async fn get_travel(
&self,
travel_id: &str,
user_id: &str,
) -> Result<OkHttpResponse<Option<TravelDto>>, ErrHttpResponse>
pub async fn get_travel( &self, travel_id: &str, user_id: &str, ) -> Result<OkHttpResponse<Option<TravelDto>>, ErrHttpResponse>
get travel by id
sourcepub async fn crate_new_travel(
&self,
user_id: &str,
travel_name: &str,
start_date: &str,
end_date: Option<&str>,
) -> Result<OkHttpResponse<TravelDto>, ErrHttpResponse>
pub async fn crate_new_travel( &self, user_id: &str, travel_name: &str, start_date: &str, end_date: Option<&str>, ) -> Result<OkHttpResponse<TravelDto>, ErrHttpResponse>
create new travel
pub async fn modify_travel( &self, travel_id: &str, travel_name: &str, start_date: &str, end_date: Option<&str>, travelers: &Vec<&str>, involved_users: &Vec<&str>, user_id: &str, ) -> Result<OkHttpResponse<TravelDto>, ErrHttpResponse>
pub async fn todo_list( &self, travel_id: &str, ) -> Result<OkHttpResponse<Vec<ToDoListGroupDto>>, ErrHttpResponse>
pub async fn todo_list_group( &self, travel_id: &str, todo_list_group_id: &u32, ) -> Result<OkHttpResponse<Option<ToDoListGroupDto>>, ErrHttpResponse>
pub async fn todo( &self, travel_id: &str, todo_list_group_id: &u32, todo_id: &u32, ) -> Result<OkHttpResponse<Option<ToDoDto>>, ErrHttpResponse>
pub async fn create_new_todo_list_group( &self, user_id: &str, travel_id: &str, name: &str, tz: Option<i64>, ) -> Result<OkHttpResponse<ToDoListGroupDto>, ErrHttpResponse>
pub async fn create_todo( &self, user_id: &str, travel_id: &str, todo_list_group_id: &u32, name: &str, description: Option<&str>, due_date: Option<&str>, ) -> Result<OkHttpResponse<ToDoDto>, ErrHttpResponse>
pub async fn update_todo_list_group( &self, user_id: &str, travel_id: &str, todo_list_group_id: &u32, name: &str, tz: Option<i32>, ) -> Result<OkHttpResponse<ToDoListGroupDto>, ErrHttpResponse>
pub async fn update_todo( &self, user_id: &str, travel_id: &str, todo_list_group_id: &u32, todo_id: &u32, summary: &str, description: Option<&str>, due_date: Option<&str>, ) -> Result<OkHttpResponse<ToDoDto>, ErrHttpResponse>
pub async fn toggle_todo( &self, user_id: &str, travel_id: &str, todo_list_group_id: &u32, todo_id: &u32, ) -> Result<OkHttpResponse<ToDoDto>, ErrHttpResponse>
Auto Trait Implementations§
impl Freeze for TravelInterface
impl !RefUnwindSafe for TravelInterface
impl Send for TravelInterface
impl Sync for TravelInterface
impl Unpin for TravelInterface
impl !UnwindSafe for TravelInterface
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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> 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.