pub struct ServerSubuser {
pub user: User,
pub server: Fetchable<Server>,
pub permissions: Vec<CompactString>,
pub ignored_files: Vec<CompactString>,
pub created: NaiveDateTime,
}Fields§
§user: User§server: Fetchable<Server>§permissions: Vec<CompactString>§ignored_files: Vec<CompactString>§created: NaiveDateTimeImplementations§
Source§impl ServerSubuser
impl ServerSubuser
pub async fn by_server_uuid_username( database: &Database, server_uuid: Uuid, username: &str, ) -> Result<Option<Self>, DatabaseError>
pub async fn by_server_uuid_with_pagination( database: &Database, server_uuid: Uuid, page: i64, per_page: i64, search: Option<&str>, ) -> Result<Pagination<Self>, DatabaseError>
pub async fn delete_by_uuids( database: &Database, server_uuid: Uuid, user_uuid: Uuid, ) -> Result<(), DatabaseError>
pub fn into_api_object( self, storage_url_retriever: &StorageUrlRetriever<'_>, ) -> ApiServerSubuser
Trait Implementations§
Source§impl BaseModel for ServerSubuser
impl BaseModel for ServerSubuser
Source§impl CreatableModel for ServerSubuser
impl CreatableModel for ServerSubuser
type CreateOptions<'a> = CreateServerSubuserOptions<'a>
type CreateResult = ServerSubuser
fn get_create_handlers() -> &'static LazyLock<CreateListenerList<Self>>
fn create<'life0, 'life1, 'async_trait>(
state: &'life0 State,
options: Self::CreateOptions<'life1>,
) -> Pin<Box<dyn Future<Output = Result<Self, DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn register_create_handler<'async_trait, F>(
priority: ListenerPriority,
callback: F,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
F: 'async_trait + for<'a> Fn(&'a mut Self::CreateOptions<'_>, &'a mut InsertQueryBuilder<'_>, &'a State, &'a mut Transaction<'_, Postgres>) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'a>> + Send + Sync + 'static,
Self: 'async_trait,
Source§fn blocking_register_create_handler<F: for<'a> Fn(&'a mut Self::CreateOptions<'_>, &'a mut InsertQueryBuilder<'_>, &'a State, &'a mut Transaction<'_, Postgres>) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'a>> + Send + Sync + 'static>(
priority: ListenerPriority,
callback: F,
)
fn blocking_register_create_handler<F: for<'a> Fn(&'a mut Self::CreateOptions<'_>, &'a mut InsertQueryBuilder<'_>, &'a State, &'a mut Transaction<'_, Postgres>) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'a>> + Send + Sync + 'static>( priority: ListenerPriority, callback: F, )
Warning Read more
fn run_create_handlers<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
options: &'life0 mut Self::CreateOptions<'life1>,
query_builder: &'life2 mut InsertQueryBuilder<'_>,
state: &'life3 State,
transaction: &'life4 mut Transaction<'life5, Postgres>,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
Source§impl DeletableModel for ServerSubuser
impl DeletableModel for ServerSubuser
type DeleteOptions = ()
fn get_delete_handlers() -> &'static LazyLock<DeleteListenerList<Self>>
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 State,
options: Self::DeleteOptions,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn register_delete_handler<'async_trait, F>( priority: ListenerPriority, callback: F, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
Source§fn blocking_register_delete_handler<F: for<'a> Fn(&'a Self, &'a Self::DeleteOptions, &'a State, &'a mut Transaction<'_, Postgres>) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a>> + Send + Sync + 'static>(
priority: ListenerPriority,
callback: F,
)
fn blocking_register_delete_handler<F: for<'a> Fn(&'a Self, &'a Self::DeleteOptions, &'a State, &'a mut Transaction<'_, Postgres>) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a>> + Send + Sync + 'static>( priority: ListenerPriority, callback: F, )
Warning Read more
fn run_delete_handlers<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
options: &'life1 Self::DeleteOptions,
state: &'life2 State,
transaction: &'life3 mut Transaction<'life4, Postgres>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Source§impl<'de> Deserialize<'de> for ServerSubuser
impl<'de> Deserialize<'de> for ServerSubuser
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for ServerSubuser
impl Serialize for ServerSubuser
Source§impl UpdatableModel for ServerSubuser
impl UpdatableModel for ServerSubuser
type UpdateOptions = UpdateServerSubuserOptions
fn get_update_handlers() -> &'static LazyLock<UpdateListenerList<Self>>
fn update<'life0, 'life1, 'async_trait>(
&'life0 mut self,
state: &'life1 State,
options: Self::UpdateOptions,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn register_update_handler<'async_trait, F>(
priority: ListenerPriority,
callback: F,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
F: 'async_trait + for<'a> Fn(&'a mut Self, &'a mut Self::UpdateOptions, &'a mut UpdateQueryBuilder<'_>, &'a State, &'a mut Transaction<'_, Postgres>) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'a>> + Send + Sync + 'static,
Self: 'async_trait,
Source§fn blocking_register_update_handler<F: for<'a> Fn(&'a mut Self, &'a mut Self::UpdateOptions, &'a mut UpdateQueryBuilder<'_>, &'a State, &'a mut Transaction<'_, Postgres>) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'a>> + Send + Sync + 'static>(
priority: ListenerPriority,
callback: F,
)
fn blocking_register_update_handler<F: for<'a> Fn(&'a mut Self, &'a mut Self::UpdateOptions, &'a mut UpdateQueryBuilder<'_>, &'a State, &'a mut Transaction<'_, Postgres>) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'a>> + Send + Sync + 'static>( priority: ListenerPriority, callback: F, )
Warning Read more
fn run_update_handlers<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 mut self,
options: &'life1 mut Self::UpdateOptions,
query_builder: &'life2 mut UpdateQueryBuilder<'_>,
state: &'life3 State,
transaction: &'life4 mut Transaction<'life5, Postgres>,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
Auto Trait Implementations§
impl Freeze for ServerSubuser
impl RefUnwindSafe for ServerSubuser
impl Send for ServerSubuser
impl Sync for ServerSubuser
impl Unpin for ServerSubuser
impl UnwindSafe for ServerSubuser
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> Chain<T> for T
impl<T> Chain<T> for T
§impl<T> Classify for T
impl<T> Classify for T
type Classified = T
fn classify(self) -> T
§impl<T> Declassify for T
impl<T> Declassify for T
type Declassified = T
fn declassify(self) -> T
§impl<T> FromBase64 for Twhere
T: for<'de> Deserialize<'de>,
impl<T> FromBase64 for Twhere
T: for<'de> Deserialize<'de>,
§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 more