Struct urbit_http_api::channel::Channel [−][src]
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
impl Channel
[src]
Channel methods for basic functionality
pub fn new(ship_interface: ShipInterface) -> Result<Channel>
[src]
Create a new channel
pub fn poke(
&mut self,
app: &str,
mark: &str,
json: &JsonValue
) -> Result<Response>
[src]
&mut self,
app: &str,
mark: &str,
json: &JsonValue
) -> Result<Response>
Sends a poke over the channel
pub fn scry(&self, app: &str, path: &str, mark: &str) -> Result<Response>
[src]
Sends a scry to the ship
pub fn spider(
&self,
input_mark: &str,
output_mark: &str,
thread_name: &str,
body: &JsonValue
) -> Result<Response>
[src]
&self,
input_mark: &str,
output_mark: &str,
thread_name: &str,
body: &JsonValue
) -> Result<Response>
Run a thread via spider
pub fn create_new_subscription(
&mut self,
app: &str,
path: &str
) -> Result<CreationID>
[src]
&mut self,
app: &str,
path: &str
) -> Result<CreationID>
Create a new Subscription
and thus subscribes to events on the
ship with the provided app/path.
pub fn parse_event_messages(&mut self)
[src]
Parses SSE messages for this channel and moves them into
the proper corresponding Subscription
’s message_list
.
pub fn find_subscription(
&mut self,
app: &str,
path: &str
) -> Option<&mut Subscription>
[src]
&mut self,
app: &str,
path: &str
) -> Option<&mut Subscription>
Finds the first Subscription
in the list which has a matching
app
and path
;
pub fn unsubscribe(&mut self, app: &str, path: &str) -> Option<bool>
[src]
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.
pub fn delete_channel(self)
[src]
Deletes the channel
impl Channel
[src]
Channel
methods which expose advanced functionality, typically by
producing another struct which is built on top of Channel
.
pub fn chat(&mut self) -> Chat<'_>
[src]
Create a Chat
struct which exposes an interface for interacting
with chats on Urbit
pub fn notebook(&mut self) -> Notebook<'_>
[src]
Create a Notebook
struct which exposes an interface for interacting
with notebooks on Urbit
pub fn graph_store(&mut self) -> GraphStore<'_>
[src]
Create a GraphStore
struct which exposes an interface for interacting
with a ship’s Graph Store.
pub fn collection(&mut self) -> Collection<'_>
[src]
Create a Collection
struct which exposes an interface for interacting
with collections on Urbit.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Channel
impl Send for Channel
impl Sync for Channel
impl Unpin for Channel
impl !UnwindSafe for Channel
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,