Struct wicrs_server::channel::Message[][src]

pub struct Message {
    pub id: ID,
    pub sender: ID,
    pub created: DateTime<Utc>,
    pub content: String,
}

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.

sender: ID

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

impl Message[src]

pub async fn id(&self, ctx: &Context<'_>) -> Result<&ID>[src]

pub async fn sender(&self, ctx: &Context<'_>) -> Result<&ID>[src]

pub async fn created(&self, ctx: &Context<'_>) -> Result<&DateTime<Utc>>[src]

pub async fn content(&self, ctx: &Context<'_>) -> Result<&String>[src]

Trait Implementations

impl Clone for Message[src]

impl ContainerType for Message[src]

impl Debug for Message[src]

impl<'de> Deserialize<'de> for Message[src]

impl Display for Message[src]

impl FromStr for Message[src]

type Err = ()

The associated error which can be returned from parsing.

impl ObjectType for Message[src]

impl OutputType for Message[src]

impl PartialEq<Message> for Message[src]

impl Serialize for Message[src]

impl StructuralPartialEq for Message[src]

impl Type for Message[src]

Auto Trait Implementations

impl RefUnwindSafe for Message

impl Send for Message

impl Sync for Message

impl Unpin for Message

impl UnwindSafe for Message

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Any + Send + Sync

impl<T> From<T> for T[src]

impl<T> Fruit for T where
    T: Send + Downcast, 
[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoResult<T> for T[src]

type Err = Infallible

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,