Struct torrust_index_backend::services::settings::Service
source · pub struct Service { /* private fields */ }
Implementations§
source§impl Service
impl Service
pub fn new( configuration: Arc<Configuration>, user_repository: Arc<DbUserRepository> ) -> Service
sourcepub async fn get_all(
&self,
user_id: &UserId
) -> Result<TorrustBackend, ServiceError>
pub async fn get_all( &self, user_id: &UserId ) -> Result<TorrustBackend, ServiceError>
It gets all the settings.
Errors
It returns an error if the user does not have the required permissions.
sourcepub async fn update_all(
&self,
torrust_backend: TorrustBackend,
user_id: &UserId
) -> Result<TorrustBackend, ServiceError>
pub async fn update_all( &self, torrust_backend: TorrustBackend, user_id: &UserId ) -> Result<TorrustBackend, ServiceError>
It updates all the settings.
Errors
It returns an error if the user does not have the required permissions.
sourcepub async fn get_public(&self) -> ConfigurationPublic
pub async fn get_public(&self) -> ConfigurationPublic
It gets only the public settings.
Errors
It returns an error if the user does not have the required permissions.
sourcepub async fn get_site_name(&self) -> String
pub async fn get_site_name(&self) -> String
It gets the site name from the settings.
Errors
It returns an error if the user does not have the required permissions.
Auto Trait Implementations§
impl !RefUnwindSafe for Service
impl Send for Service
impl Sync for Service
impl Unpin for Service
impl !UnwindSafe for Service
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