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
Auto Trait Implementations
impl !RefUnwindSafe for Channel
impl !UnwindSafe for Channel
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
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