pub struct Alert {Show 14 fields
pub id: i32,
pub user_id: i32,
pub created_at: i64,
pub area: String,
pub area_level2: String,
pub area_level3: String,
pub text1: String,
pub text2: String,
pub text3: String,
pub audio1: Vec<u8>,
pub audio2: Vec<u8>,
pub audio3: Vec<u8>,
pub reached_users: i32,
pub notifications: Vec<Notification>,
}
Expand description
Alert struct
Fields§
§id: i32
§user_id: i32
§created_at: i64
§area: String
§area_level2: String
§area_level3: String
§text1: String
§text2: String
§text3: String
§audio1: Vec<u8>
§audio2: Vec<u8>
§audio3: Vec<u8>
§reached_users: i32
§notifications: Vec<Notification>
Implementations§
Source§impl Alert
impl Alert
pub async fn id(&self, ctx: &Context<'_>) -> Result<&i32>
pub async fn user_id(&self, ctx: &Context<'_>) -> Result<&i32>
pub async fn created_at(&self, ctx: &Context<'_>) -> Result<&i64>
pub async fn area(&self, ctx: &Context<'_>) -> Result<&String>
pub async fn area_level2(&self, ctx: &Context<'_>) -> Result<&String>
pub async fn area_level3(&self, ctx: &Context<'_>) -> Result<&String>
pub async fn text1(&self, ctx: &Context<'_>) -> Result<&String>
pub async fn text2(&self, ctx: &Context<'_>) -> Result<&String>
pub async fn text3(&self, ctx: &Context<'_>) -> Result<&String>
pub async fn audio1(&self, ctx: &Context<'_>) -> Result<&Vec<u8>>
pub async fn audio2(&self, ctx: &Context<'_>) -> Result<&Vec<u8>>
pub async fn audio3(&self, ctx: &Context<'_>) -> Result<&Vec<u8>>
pub async fn reached_users(&self, ctx: &Context<'_>) -> Result<&i32>
pub async fn notifications( &self, ctx: &Context<'_>, ) -> Result<&Vec<Notification>>
Trait Implementations§
Source§impl ContainerType for Alert
impl ContainerType for Alert
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<'de> Deserialize<'de> for Alert
impl<'de> Deserialize<'de> for Alert
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 Alert
impl OutputType for Alert
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 Alert
Auto Trait Implementations§
impl Freeze for Alert
impl RefUnwindSafe for Alert
impl Send for Alert
impl Sync for Alert
impl Unpin for Alert
impl UnwindSafe for Alert
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