Struct urbit_http_api::channel::Channel[][src]

pub struct Channel {
    pub ship_interface: ShipInterface,
    pub uid: String,
    pub url: String,
    pub subscription_list: Vec<Subscription>,
    pub message_id_count: u64,
    // some fields omitted
}
Expand description

A Channel which is used to interact with a ship

Fields

ship_interface: ShipInterface

ShipInterface this channel is created from

uid: String

The uid of the channel

url: String

The url of the channel

subscription_list: Vec<Subscription>message_id_count: u64

The current number of messages that have been sent out (which are also defined as message ids) via this Channel

Implementations

Channel methods for basic functionality

Create a new channel

Sends a poke over the channel

Sends a scry to the ship

Run a thread via spider

Create a new Subscription and thus subscribes to events on the ship with the provided app/path.

Parses SSE messages for this channel and moves them into the proper corresponding Subscription’s message_list.

Finds the first Subscription in the list which has a matching app and path;

Finds the first Subscription in the list which has a matching app and path, removes it from the list, and tells the ship that you are unsubscribing. Returns None if failed to find a subscription with a matching app & path.

Deletes the channel

Channel methods which expose advanced functionality, typically by producing another struct which is built on top of Channel.

Create a Chat struct which exposes an interface for interacting with chats on Urbit

Create a Notebook struct which exposes an interface for interacting with notebooks on Urbit

Create a GraphStore struct which exposes an interface for interacting with a ship’s Graph Store.

Create a Collection struct which exposes an interface for interacting with collections on Urbit.

Trait Implementations

Formats the value using the given formatter. 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