pub struct Services {
pub auth: AdminClient,
pub characters: AdminClient,
pub combat: AdminClient,
pub monsters: AdminClient,
}Expand description
The four services’ admin APIs, to act on a whole campaign at once.
Fields§
§auth: AdminClient§characters: AdminClient§combat: AdminClient§monsters: AdminClientImplementations§
Source§impl Services
impl Services
Sourcepub async fn export_campaign(
&self,
campaign: Uuid,
) -> Result<CampaignBundle, ClientError>
pub async fn export_campaign( &self, campaign: Uuid, ) -> Result<CampaignBundle, ClientError>
Every service’s part of campaign. Make it read-only first, or
changes made meanwhile may be in one part and not another.
Sourcepub async fn import_campaign(
&self,
bundle: &CampaignBundle,
) -> Result<(), ClientError>
pub async fn import_campaign( &self, bundle: &CampaignBundle, ) -> Result<(), ClientError>
Takes in a whole campaign, the auth service’s part first. Should a
part fail, those already in are deleted again, so it’s all or
nothing; ClientError::Conflict if the campaign is there already.
Sourcepub async fn delete_campaign(&self, campaign: Uuid) -> Result<(), ClientError>
pub async fn delete_campaign(&self, campaign: Uuid) -> Result<(), ClientError>
Deletes a campaign from every service, the auth service last, so that one cut short leaves it known, to delete again. Safe to repeat.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Services
impl !RefUnwindSafe for Services
impl Send for Services
impl Sync for Services
impl Unpin for Services
impl UnsafeUnpin for Services
impl !UnwindSafe for Services
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