pub struct User {
pub id: i32,
pub email: String,
pub password: String,
pub name: Option<String>,
pub address: Option<String>,
pub notification_token: Option<String>,
pub is_admin: bool,
}
Expand description
User struct
Fields§
§id: i32
§email: String
§password: String
§name: Option<String>
§address: Option<String>
§notification_token: Option<String>
§is_admin: bool
Implementations§
Source§impl User
impl User
async fn id(&self, _: &Context<'_>) -> Result<i32>
async fn email(&self, _: &Context<'_>) -> Result<String>
async fn password(&self, _: &Context<'_>) -> Result<String>
async fn name(&self, _: &Context<'_>) -> Result<String>
async fn address(&self, _: &Context<'_>) -> Result<String>
async fn notification_token(&self, _: &Context<'_>) -> Result<String>
async fn is_admin(&self, _: &Context<'_>) -> Result<bool>
Trait Implementations§
Source§impl ContainerType for User
impl ContainerType for User
Source§async fn resolve_field(&self, ctx: &Context<'_>) -> ServerResult<Option<Value>>
async fn resolve_field(&self, ctx: &Context<'_>) -> ServerResult<Option<Value>>
Resolves a field value and outputs it as a json value
async_graphql::Value
. Read moreSource§async fn find_entity(
&self,
ctx: &Context<'_>,
params: &Value,
) -> ServerResult<Option<Value>>
async fn find_entity( &self, ctx: &Context<'_>, params: &Value, ) -> ServerResult<Option<Value>>
Find the GraphQL entity with the given name from the parameter. Read more
Source§impl<'de> Deserialize<'de> for User
impl<'de> Deserialize<'de> for User
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 OutputType for User
impl OutputType for User
Source§fn create_type_info(registry: &mut Registry) -> String
fn create_type_info(registry: &mut Registry) -> String
Create type information in the registry and return qualified typename.
Source§async fn resolve(
&self,
ctx: &ContextSelectionSet<'_>,
_field: &Positioned<Field>,
) -> ServerResult<Value>
async fn resolve( &self, ctx: &ContextSelectionSet<'_>, _field: &Positioned<Field>, ) -> ServerResult<Value>
Resolve an output value to
async_graphql::Value
.§fn qualified_type_name() -> String
fn qualified_type_name() -> String
Qualified typename.
§fn introspection_type_name(&self) -> Cow<'static, str>
fn introspection_type_name(&self) -> Cow<'static, str>
Introspection type name Read more
impl ObjectType for User
Auto Trait Implementations§
impl Freeze for User
impl RefUnwindSafe for User
impl Send for User
impl Sync for User
impl Unpin for User
impl UnwindSafe for User
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