Struct urbit_http_api::apps::chat::Chat[][src]

pub struct Chat<'a> {
    pub channel: &'a mut Channel,
}
Expand description

A struct that provides an interface for interacting with Urbit chats

Fields

channel: &'a mut Channel

Implementations

Send a message to an Urbit chat. Returns the index of the node that was added to Graph Store.

Extracts chat log automatically into a list of formatted Strings

Extracts a chat’s messages as AuthoredMessages

Subscribe to and watch for messages. This method returns a Receiver with the AuthoredMessages that are posted after subscribing. Simply call receiver.try_recv() to read the next AuthoredMessage if one has been posted.

Technical Note: This method actually creates a new Channel with your Urbit Ship, and spawns a new unix thread locally that processes all messages on said channel. This is required due to borrowing mechanisms in Rust, however on the plus side this makes it potentially more performant by each subscription having it’s own unix thread.

Trait Implementations

Returns the reference to the Channel being used

Send a message to an Urbit chat/DM. Returns the index of the node that was added to Graph Store. Read more

Extracts messages automatically into a list of formatted Strings

Extracts messages as AuthoredMessages

Extracts a message nodes

Subscribe to and watch for messages. This method returns a Receiver with the AuthoredMessages that are posted after subscribing. Simply call receiver.try_recv() to read the next AuthoredMessage if one has been posted. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more