pub struct Service<S: ServiceState = Unauthenticated> {
pub _marker: PhantomData<S>,
/* private fields */
}Fields§
§_marker: PhantomData<S>Implementations§
Source§impl Service<Unauthenticated>
impl Service<Unauthenticated>
pub fn with_resource(resource: Resource) -> Service<Unauthenticated>
Source§impl Service<OnlyHost>
impl Service<OnlyHost>
pub fn auth(self, auth: ServiceAuth) -> Service<Authenticated>
Source§impl Service<Authenticated>
impl Service<Authenticated>
pub async fn create(&self, data: Value) -> Result<Value>
pub async fn get_all(&self, options: GetAllOptions) -> Result<Value>
pub async fn get_by_id(&mut self, id: &str) -> Result<Value>
pub async fn update_by_id(&self, id: &str, data: Value) -> Result<Value>
pub async fn delete_by_id(&self, id: &str) -> Result<Value>
pub async fn get_all_entity(&mut self, id: &str, entity: &str) -> Result<Value>
Auto Trait Implementations§
impl<S> Freeze for Service<S>
impl<S> RefUnwindSafe for Service<S>where
S: RefUnwindSafe,
impl<S> Send for Service<S>where
S: Send,
impl<S> Sync for Service<S>where
S: Sync,
impl<S> Unpin for Service<S>where
S: Unpin,
impl<S> UnwindSafe for Service<S>where
S: UnwindSafe,
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