Struct urbit_http_api::graph::NodeContents [−][src]
Struct which represents the contents inside of a node
Fields
content_list: Vec<JsonValue>Implementations
impl NodeContents[src]
Methods for NodeContents
pub fn new() -> NodeContents[src]
Create a new empty NodeContents
pub fn is_empty(&self) -> bool[src]
pub fn add_text(&self, text: &str) -> NodeContents[src]
Appends text to the end of the list of contents
pub fn add_url(&self, url: &str) -> NodeContents[src]
Appends a url to the end of the list of contents
pub fn add_mention(&self, referenced_ship: &str) -> NodeContents[src]
Appends a mention to another @p/ship to the end of the list of contents
pub fn add_code(&self, expression: &str, output: &str) -> NodeContents[src]
Appends a code block to the end of the list of contents
pub fn from_json(json_contents: Vec<JsonValue>) -> NodeContents[src]
Create a NodeContents from a list of JsonValues
pub fn to_json(&self) -> JsonValue[src]
Convert the NodeContents into a json array in a JsonValue
pub fn to_formatted_string(&self) -> String[src]
Convert the NodeContents into a single String that is formatted
for human reading.
pub fn to_formatted_words(&self) -> Vec<String>[src]
Converts the NodeContents into a String that is formatted
for human reading, which is then split at every whitespace.
Useful for parsing a message.
Trait Implementations
impl Clone for NodeContents[src]
fn clone(&self) -> NodeContents[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Debug for NodeContents[src]
Auto Trait Implementations
impl RefUnwindSafe for NodeContents[src]
impl Send for NodeContents[src]
impl Sync for NodeContents[src]
impl Unpin for NodeContents[src]
impl UnwindSafe for NodeContents[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> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
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>,