Struct urbit_http_api::chat::Chat [−][src]
A struct that provides an interface for interacting with Urbit chats
Fields
channel: &'a mut ChannelImplementations
impl<'a> Chat<'a>[src]
Methods for interacting with a Chat
pub fn send_message(
&mut self,
chat_ship: &str,
chat_name: &str,
message: &Message
) -> Result<String>[src]
&mut self,
chat_ship: &str,
chat_name: &str,
message: &Message
) -> Result<String>
Send a message to an Urbit chat. Returns the index of the node that was added to Graph Store.
pub fn export_chat_log(
&mut self,
chat_ship: &str,
chat_name: &str
) -> Result<Vec<String>>[src]
&mut self,
chat_ship: &str,
chat_name: &str
) -> Result<Vec<String>>
Extracts a Chat’s messages automatically into a list of formatted Strings
pub fn export_authored_messages(
&mut self,
chat_ship: &str,
chat_name: &str
) -> Result<Vec<AuthoredMessage>>[src]
&mut self,
chat_ship: &str,
chat_name: &str
) -> Result<Vec<AuthoredMessage>>
Extracts a Chat’s messages as AuthoredMessages
pub fn subscribe_to_chat(
&mut self,
chat_ship: &str,
chat_name: &str
) -> Result<Receiver<AuthoredMessage>>[src]
&mut self,
chat_ship: &str,
chat_name: &str
) -> Result<Receiver<AuthoredMessage>>
Subscribe to and watch for messages for a specific chat. This method returns a Receiver with the
AuthoredMessages that are posted to the chat after subscribing. Simply call receiver.try_recv()
to read the next AuthoredMessage if one has been posted in the specified chat.
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.
Auto Trait Implementations
impl<'a> !RefUnwindSafe for Chat<'a>
impl<'a> Send for Chat<'a>
impl<'a> Sync for Chat<'a>
impl<'a> Unpin for Chat<'a>
impl<'a> !UnwindSafe for Chat<'a>
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>,