pub struct ProjectMembership {
pub id: u64,
pub project: ProjectEssentials,
pub user: Option<UserEssentials>,
pub group: Option<GroupEssentials>,
pub roles: Vec<RoleEssentials>,
}
Expand description
a type for project memberships to use as an API return type
alternatively you can use your own type limited to the fields you need
Fields§
§id: u64
numeric id
project: ProjectEssentials
the project
user: Option<UserEssentials>
the user (project member), optional because alternatively we could have a group
group: Option<GroupEssentials>
the group (project member), optional because alternatively we could have a user
roles: Vec<RoleEssentials>
the roles the user or group has in the project
Trait Implementations§
Source§impl Clone for ProjectMembership
impl Clone for ProjectMembership
Source§fn clone(&self) -> ProjectMembership
fn clone(&self) -> ProjectMembership
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ProjectMembership
impl Debug for ProjectMembership
Source§impl<'de> Deserialize<'de> for ProjectMembership
impl<'de> Deserialize<'de> for ProjectMembership
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 PartialEq for ProjectMembership
impl PartialEq for ProjectMembership
Source§impl Serialize for ProjectMembership
impl Serialize for ProjectMembership
impl Eq for ProjectMembership
impl StructuralPartialEq for ProjectMembership
Auto Trait Implementations§
impl Freeze for ProjectMembership
impl RefUnwindSafe for ProjectMembership
impl Send for ProjectMembership
impl Sync for ProjectMembership
impl Unpin for ProjectMembership
impl UnwindSafe for ProjectMembership
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