#[non_exhaustive]pub struct GrantRole {
pub user: UserId,
pub role: String,
}Expand description
Grant a role: PUT /v1/admin/users/{user}/roles/{role} → Ack.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.user: UserIdThe account.
role: StringThe role (is_valid_role).
Implementations§
Trait Implementations§
impl Eq for GrantRole
Source§impl HttpCall for GrantRole
impl HttpCall for GrantRole
Source§const ROUTE: Route
const ROUTE: Route
The route: method, path template (
{param} placeholders) and whether a Bearer token is
required. Always one entry of routes::ALL.Source§const PAYLOAD: PayloadKind = PayloadKind::Empty
const PAYLOAD: PayloadKind = PayloadKind::Empty
How the payload travels.
Source§fn path_params(&self) -> PathParams
fn path_params(&self) -> PathParams
The values of the path’s placeholders (none for a route without parameters).
Source§fn from_parts(
params: &PathParams,
_payload: NoPayload,
) -> Result<Self, ApiError>
fn from_parts( params: &PathParams, _payload: NoPayload, ) -> Result<Self, ApiError>
The call from what a server received: the path parameters by name and the decoded
payload. Checks the shape of the path parameters (400
bad_request for an id that is not
a number or an invalid name); the payload’s own rules are its validate(), which the
server runs.impl StructuralPartialEq for GrantRole
Auto Trait Implementations§
impl Freeze for GrantRole
impl RefUnwindSafe for GrantRole
impl Send for GrantRole
impl Sync for GrantRole
impl Unpin for GrantRole
impl UnsafeUnpin for GrantRole
impl UnwindSafe for GrantRole
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ConditionalSend for Twhere
T: Send,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
Source§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Converts this type into the system output type.