Struct urbit_http_api::apps::chat::Chat [−][src]
A struct that provides an interface for interacting with Urbit chats
Fields
channel: &'a mut Channel
Implementations
impl<'a> Chat<'a>
[src]
pub fn send_chat_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 chat log automatically into a list of formatted String
s
pub fn export_chat_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 AuthoredMessage
s
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. This method returns a Receiver
with the
AuthoredMessage
s that are posted after subscribing. Simply call receiver.try_recv()
to read the next AuthoredMessage
if one has been posted.
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.
Trait Implementations
impl<'a> Messaging for Chat<'a>
[src]
fn channel(&mut self) -> &mut Channel
[src]
fn send_message(
&mut self,
resource_ship: &str,
resource_name: &str,
message: &Message
) -> Result<String>
[src]
&mut self,
resource_ship: &str,
resource_name: &str,
message: &Message
) -> Result<String>
fn export_message_log(
&mut self,
resource_ship: &str,
resource_name: &str
) -> Result<Vec<String>>
[src]
&mut self,
resource_ship: &str,
resource_name: &str
) -> Result<Vec<String>>
fn export_authored_messages(
&mut self,
resource_ship: &str,
resource_name: &str
) -> Result<Vec<AuthoredMessage>>
[src]
&mut self,
resource_ship: &str,
resource_name: &str
) -> Result<Vec<AuthoredMessage>>
fn export_message_nodes(
&mut self,
resource_ship: &str,
resource_name: &str
) -> Result<Vec<Node>>
[src]
&mut self,
resource_ship: &str,
resource_name: &str
) -> Result<Vec<Node>>
fn subscribe_to_messages(
&mut self,
resource_ship: &str,
resource_name: &str
) -> Result<Receiver<AuthoredMessage>>
[src]
&mut self,
resource_ship: &str,
resource_name: &str
) -> Result<Receiver<AuthoredMessage>>
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>,