pub struct Notification {
pub id: i32,
pub alert: Option<Alert>,
pub user_id: i32,
pub latitude: f64,
pub longitude: f64,
pub moving_activity: MovingActivity,
pub seen: bool,
pub level: LevelAlert,
pub created_at: i64,
}
Expand description
Notification struct
Fields§
§id: i32
§alert: Option<Alert>
§user_id: i32
§latitude: f64
§longitude: f64
§moving_activity: MovingActivity
§seen: bool
§level: LevelAlert
§created_at: i64
Implementations§
Source§impl Notification
impl Notification
pub async fn id(&self, ctx: &Context<'_>) -> Result<&i32>
pub async fn alert(&self, ctx: &Context<'_>) -> Result<&Option<Alert>>
pub async fn user_id(&self, ctx: &Context<'_>) -> Result<&i32>
pub async fn latitude(&self, ctx: &Context<'_>) -> Result<&f64>
pub async fn longitude(&self, ctx: &Context<'_>) -> Result<&f64>
pub async fn moving_activity( &self, ctx: &Context<'_>, ) -> Result<&MovingActivity>
pub async fn seen(&self, ctx: &Context<'_>) -> Result<&bool>
pub async fn level(&self, ctx: &Context<'_>) -> Result<&LevelAlert>
pub async fn created_at(&self, ctx: &Context<'_>) -> Result<&i64>
Trait Implementations§
Source§impl Clone for Notification
impl Clone for Notification
Source§fn clone(&self) -> Notification
fn clone(&self) -> Notification
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 ContainerType for Notification
impl ContainerType for Notification
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 more§fn collect_all_fields<'a>(
&'a self,
ctx: &ContextBase<'a, &'a Positioned<SelectionSet>>,
fields: &mut Fields<'a>,
) -> Result<(), ServerError>
fn collect_all_fields<'a>( &'a self, ctx: &ContextBase<'a, &'a Positioned<SelectionSet>>, fields: &mut Fields<'a>, ) -> Result<(), ServerError>
Collect all the fields of the container that are queried in the
selection set. Read more
Source§impl Debug for Notification
impl Debug for Notification
Source§impl<'de> Deserialize<'de> for Notification
impl<'de> Deserialize<'de> for Notification
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 Notification
impl OutputType for Notification
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
Source§impl Serialize for Notification
impl Serialize for Notification
impl ObjectType for Notification
Auto Trait Implementations§
impl Freeze for Notification
impl RefUnwindSafe for Notification
impl Send for Notification
impl Sync for Notification
impl Unpin for Notification
impl UnwindSafe for Notification
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