[−][src]Struct urbit_http_api::channel::Channel
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]
pub fn new(ship_interface: ShipInterface) -> Result<Channel>
[src]
Create a new channel
pub fn get_and_raise_message_id_count(&mut self) -> u64
[src]
Acquires and returns the current message_id_count
from the
ShipInterface
that this channel was created from while also
increase said value by 1.
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 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
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Channel
[src]
impl Send for Channel
[src]
impl Sync for Channel
[src]
impl Unpin for Channel
[src]
impl !UnwindSafe for Channel
[src]
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>,