Struct wicrs_server::channel::Message [−][src]
pub struct Message { pub id: ID, pub hub_id: ID, pub channel_id: ID, pub sender: String, pub created: DateTime<Utc>, pub content: String, }
Expand description
Represents a message.
Fields
id: ID
ID of the message, not actually guaranteed to be unique due to the performance that could be required to check this for every message sent.
hub_id: ID
ID of the hub the message was sent in.
channel_id: ID
ID of the channel the message was sent in.
sender: String
ID of the user that sent the message.
created: DateTime<Utc>
Date in milliseconds since Unix Epoch that the message was sent.
content: String
The actual text of the message.
Implementations
pub fn sign<F: FnOnce() -> String>(
&self,
secret_key: &impl SecretKeyTrait,
password: F
) -> Result<OpenPGPMessage>
[src]pub fn from_double_signed_verify(
message_str: &str,
server_public_key: &impl PublicKeyTrait,
client_public_key: &impl PublicKeyTrait
) -> Result<Self>
[src]pub fn sign_final<F: FnOnce() -> String>(
message_str: &str,
server_public_key: &impl PublicKeyTrait,
client_secret_key: &impl SecretKeyTrait,
password: F
) -> Result<OpenPGPMessage>
[src]Trait Implementations
fn resolve_field<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context<'life2>
) -> Pin<Box<dyn Future<Output = ServerResult<Option<Value>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
[src]
fn resolve_field<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context<'life2>
) -> Pin<Box<dyn Future<Output = ServerResult<Option<Value>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
[src]Resolves a field value and outputs it as a json value async_graphql::Value
. Read more
fn collect_all_fields(
&'a self,
ctx: &ContextBase<'a, &'a Positioned<SelectionSet>>,
fields: &mut Fields<'a>
) -> Result<(), ServerError> where
Self: Send + Sync,
[src]
fn collect_all_fields(
&'a self,
ctx: &ContextBase<'a, &'a Positioned<SelectionSet>>,
fields: &mut Fields<'a>
) -> Result<(), ServerError> where
Self: Send + Sync,
[src]Collect all the fields of the container that are queried in the selection set. Read more
#[must_use]fn find_entity<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
__arg1: &'life1 ContextBase<'life2, &'life2 Positioned<Field>>,
_params: &'life3 ConstValue
) -> Pin<Box<dyn Future<Output = Result<Option<ConstValue>, ServerError>> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: Sync + 'async_trait,
[src]
#[must_use]fn find_entity<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
__arg1: &'life1 ContextBase<'life2, &'life2 Positioned<Field>>,
_params: &'life3 ConstValue
) -> Pin<Box<dyn Future<Output = Result<Option<ConstValue>, ServerError>> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: Sync + 'async_trait,
[src]Find the GraphQL entity with the given name from the parameter. Read more
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
fn resolve<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 ContextSelectionSet<'life2>,
_field: &'life3 Positioned<Field>
) -> Pin<Box<dyn Future<Output = ServerResult<Value>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
[src]
fn resolve<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 ContextSelectionSet<'life2>,
_field: &'life3 Positioned<Field>
) -> Pin<Box<dyn Future<Output = ServerResult<Value>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
[src]Resolve an output value to async_graphql::Value
.
Create type information in the registry and return qualified typename.
Qualified typename.
Introspection type name Read more
Auto Trait Implementations
impl RefUnwindSafe for Message
impl UnwindSafe for Message
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V