Struct janetrs::JanetSymbol[][src]

#[repr(transparent)]
pub struct JanetSymbol<'data> { /* fields omitted */ }
Expand description

Janet symbol type. Usually used to name things in Janet.

Implementations

impl JanetSymbol<'_>[src]

pub fn new(name: impl AsRef<[u8]>) -> Self[src]

Create a JanetSymbol with given name.

If the given name is bigger than i32::MAX the generated symbol will have a name trucated to that max size. That’s unrealistic thought.

Examples

use janetrs::JanetSymbol;

let s = JanetSymbol::new("name");

pub fn unique() -> Self[src]

Generate a unique Janet symbol. This is used in the library function gensym. The symbol will be of the format _XXXXXX, where X is a base64 digit, and prefix is the argument passed. No prefix for speed.

Examples

use janetrs::JanetSymbol;

let s = JanetSymbol::unique();

pub const unsafe fn from_raw(raw: *const u8) -> Self[src]

Create a new JanetSymbol with a raw pointer.

Safety

This function do not check if the given raw is NULL or not. Use at your own risk.

pub fn len(&self) -> i32[src]

Returns the length of this JanetSymbol, in bytes, not chars or graphemes. In other words, it may not be what a human considers the length of the string.

Examples

use janetrs::JanetSymbol;

let s = JanetSymbol::new("name");
assert_eq!(s.len(), 4);

pub fn is_empty(&self) -> bool[src]

Returns true if this JanetSymbol has a length of zero, and false otherwise.

Examples

use janetrs::JanetSymbol;

let s = JanetSymbol::new("name");
assert!(!s.is_empty());

pub fn as_bytes(&self) -> &[u8][src]

Returns a byte slice of the JanetString contents.

Examples

use janetrs::JanetSymbol;

let s = JanetSymbol::new("hello");

assert_eq!(&[104, 101, 108, 108, 111], s.as_bytes());

pub const fn as_raw(&self) -> *const u8[src]

Return a raw pointer to the symbol raw structure.

The caller must ensure that the buffer outlives the pointer this function returns, or else it will end up pointing to garbage.

Trait Implementations

impl AsRef<[u8]> for JanetSymbol<'_>[src]

fn as_ref(&self) -> &[u8][src]

Performs the conversion.

impl AsRef<BStr> for JanetSymbol<'_>[src]

fn as_ref(&self) -> &BStr[src]

Performs the conversion.

impl Clone for JanetSymbol<'_>[src]

fn clone(&self) -> Self[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for JanetSymbol<'_>[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl Display for JanetSymbol<'_>[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl From<&'_ [u8]> for JanetSymbol<'_>[src]

fn from(bytes: &[u8]) -> Self[src]

Performs the conversion.

impl From<&'_ JanetBuffer<'_>> for JanetSymbol<'_>[src]

fn from(buff: &JanetBuffer<'_>) -> Self[src]

Performs the conversion.

impl From<&'_ JanetKeyword<'_>> for JanetSymbol<'_>[src]

fn from(key: &JanetKeyword<'_>) -> Self[src]

Performs the conversion.

impl From<&'_ JanetString<'_>> for JanetSymbol<'_>[src]

fn from(string: &JanetString<'_>) -> Self[src]

Performs the conversion.

impl From<&'_ JanetSymbol<'_>> for JanetBuffer<'_>[src]

fn from(s: &JanetSymbol<'_>) -> Self[src]

Performs the conversion.

impl From<&'_ JanetSymbol<'_>> for JanetString<'_>[src]

fn from(sym: &JanetSymbol<'_>) -> Self[src]

Performs the conversion.

impl From<&'_ JanetSymbol<'_>> for JanetKeyword<'_>[src]

fn from(sym: &JanetSymbol<'_>) -> Self[src]

Performs the conversion.

impl From<&'_ JanetSymbol<'_>> for Janet[src]

fn from(val: &JanetSymbol<'_>) -> Self[src]

Performs the conversion.

impl From<&'_ str> for JanetSymbol<'_>[src]

fn from(rust_str: &str) -> Self[src]

Performs the conversion.

impl From<JanetBuffer<'_>> for JanetSymbol<'_>[src]

fn from(buff: JanetBuffer<'_>) -> Self[src]

Performs the conversion.

impl From<JanetKeyword<'_>> for JanetSymbol<'_>[src]

fn from(key: JanetKeyword<'_>) -> Self[src]

Performs the conversion.

impl From<JanetString<'_>> for JanetSymbol<'_>[src]

fn from(string: JanetString<'_>) -> Self[src]

Performs the conversion.

impl From<JanetSymbol<'_>> for JanetBuffer<'_>[src]

fn from(s: JanetSymbol<'_>) -> Self[src]

Performs the conversion.

impl From<JanetSymbol<'_>> for JanetString<'_>[src]

fn from(sym: JanetSymbol<'_>) -> Self[src]

Performs the conversion.

impl From<JanetSymbol<'_>> for JanetKeyword<'_>[src]

fn from(sym: JanetSymbol<'_>) -> Self[src]

Performs the conversion.

impl From<JanetSymbol<'_>> for Janet[src]

fn from(val: JanetSymbol<'_>) -> Self[src]

Performs the conversion.

impl From<String> for JanetSymbol<'_>[src]

fn from(s: String) -> Self[src]

Performs the conversion.

impl From<Vec<u8, Global>> for JanetSymbol<'_>[src]

fn from(vec: Vec<u8>) -> Self[src]

Performs the conversion.

impl FromStr for JanetSymbol<'_>[src]

type Err = Infallible

The associated error which can be returned from parsing.

fn from_str(s: &str) -> Result<Self, Self::Err>[src]

Parses a string s to return a value of this type. Read more

impl Ord for JanetSymbol<'_>[src]

fn cmp(&self, other: &Self) -> Ordering[src]

This method returns an Ordering between self and other. Read more

#[must_use]
fn max(self, other: Self) -> Self
1.21.0[src]

Compares and returns the maximum of two values. Read more

#[must_use]
fn min(self, other: Self) -> Self
1.21.0[src]

Compares and returns the minimum of two values. Read more

#[must_use]
fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]

Restrict a value to a certain interval. Read more

impl<'a, 'b> PartialEq<&'a [u8]> for JanetSymbol<'_>[src]

fn eq(&self, other: &&'a [u8]) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<'a, 'b> PartialEq<&'a BStr> for JanetSymbol<'_>[src]

fn eq(&self, other: &&'a BStr) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<'a, 'b> PartialEq<&'a BString> for JanetSymbol<'_>[src]

fn eq(&self, other: &&'a BString) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<'a, 'b> PartialEq<&'a str> for JanetSymbol<'_>[src]

fn eq(&self, other: &&'a str) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<'a, 'b> PartialEq<[u8]> for JanetSymbol<'_>[src]

fn eq(&self, other: &[u8]) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<'a, 'b> PartialEq<BStr> for JanetSymbol<'_>[src]

fn eq(&self, other: &BStr) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<'a, 'b> PartialEq<BString> for JanetSymbol<'_>[src]

fn eq(&self, other: &BString) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl PartialEq<JanetKeyword<'_>> for JanetSymbol<'_>[src]

fn eq(&self, other: &JanetKeyword<'_>) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl PartialEq<JanetString<'_>> for JanetSymbol<'_>[src]

fn eq(&self, other: &JanetString<'_>) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl PartialEq<JanetSymbol<'_>> for JanetSymbol<'_>[src]

fn eq(&self, other: &Self) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl PartialEq<JanetSymbol<'_>> for JanetString<'_>[src]

fn eq(&self, other: &JanetSymbol<'_>) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl PartialEq<JanetSymbol<'_>> for JanetKeyword<'_>[src]

fn eq(&self, other: &JanetSymbol<'_>) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<'a, 'b> PartialEq<String> for JanetSymbol<'_>[src]

fn eq(&self, other: &String) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<'a, 'b> PartialEq<Vec<u8, Global>> for JanetSymbol<'_>[src]

fn eq(&self, other: &Vec<u8>) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<'a, 'b> PartialEq<str> for JanetSymbol<'_>[src]

fn eq(&self, other: &str) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<'a, 'b> PartialOrd<&'a [u8]> for JanetSymbol<'_>[src]

fn partial_cmp(&self, other: &&'a [u8]) -> Option<Ordering>[src]

This method returns an ordering between self and other values if one exists. Read more

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<'a, 'b> PartialOrd<&'a BStr> for JanetSymbol<'_>[src]

fn partial_cmp(&self, other: &&'a BStr) -> Option<Ordering>[src]

This method returns an ordering between self and other values if one exists. Read more

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<'a, 'b> PartialOrd<&'a BString> for JanetSymbol<'_>[src]

fn partial_cmp(&self, other: &&'a BString) -> Option<Ordering>[src]

This method returns an ordering between self and other values if one exists. Read more

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<'a, 'b> PartialOrd<&'a str> for JanetSymbol<'_>[src]

fn partial_cmp(&self, other: &&'a str) -> Option<Ordering>[src]

This method returns an ordering between self and other values if one exists. Read more

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<'a, 'b> PartialOrd<[u8]> for JanetSymbol<'_>[src]

fn partial_cmp(&self, other: &[u8]) -> Option<Ordering>[src]

This method returns an ordering between self and other values if one exists. Read more

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<'a, 'b> PartialOrd<BStr> for JanetSymbol<'_>[src]

fn partial_cmp(&self, other: &BStr) -> Option<Ordering>[src]

This method returns an ordering between self and other values if one exists. Read more

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<'a, 'b> PartialOrd<BString> for JanetSymbol<'_>[src]

fn partial_cmp(&self, other: &BString) -> Option<Ordering>[src]

This method returns an ordering between self and other values if one exists. Read more

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl PartialOrd<JanetKeyword<'_>> for JanetSymbol<'_>[src]

fn partial_cmp(&self, other: &JanetKeyword<'_>) -> Option<Ordering>[src]

This method returns an ordering between self and other values if one exists. Read more

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl PartialOrd<JanetString<'_>> for JanetSymbol<'_>[src]

fn partial_cmp(&self, other: &JanetString<'_>) -> Option<Ordering>[src]

This method returns an ordering between self and other values if one exists. Read more

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl PartialOrd<JanetSymbol<'_>> for JanetSymbol<'_>[src]

fn partial_cmp(&self, other: &Self) -> Option<Ordering>[src]

This method returns an ordering between self and other values if one exists. Read more

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl PartialOrd<JanetSymbol<'_>> for JanetString<'_>[src]

fn partial_cmp(&self, other: &JanetSymbol<'_>) -> Option<Ordering>[src]

This method returns an ordering between self and other values if one exists. Read more

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl PartialOrd<JanetSymbol<'_>> for JanetKeyword<'_>[src]

fn partial_cmp(&self, other: &JanetSymbol<'_>) -> Option<Ordering>[src]

This method returns an ordering between self and other values if one exists. Read more

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<'a, 'b> PartialOrd<String> for JanetSymbol<'_>[src]

fn partial_cmp(&self, other: &String) -> Option<Ordering>[src]

This method returns an ordering between self and other values if one exists. Read more

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<'a, 'b> PartialOrd<Vec<u8, Global>> for JanetSymbol<'_>[src]

fn partial_cmp(&self, other: &Vec<u8>) -> Option<Ordering>[src]

This method returns an ordering between self and other values if one exists. Read more

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<'a, 'b> PartialOrd<str> for JanetSymbol<'_>[src]

fn partial_cmp(&self, other: &str) -> Option<Ordering>[src]

This method returns an ordering between self and other values if one exists. Read more

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl TryFrom<Janet> for JanetSymbol<'_>[src]

type Error = JanetConversionError

The type returned in the event of a conversion error.

fn try_from(value: Janet) -> Result<Self, Self::Error>[src]

Performs the conversion.

impl Eq for JanetSymbol<'_>[src]

Auto Trait Implementations

impl<'data> RefUnwindSafe for JanetSymbol<'data>

impl<'data> !Send for JanetSymbol<'data>

impl<'data> !Sync for JanetSymbol<'data>

impl<'data> Unpin for JanetSymbol<'data>

impl<'data> UnwindSafe for JanetSymbol<'data>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T> ToString for T where
    T: Display + ?Sized
[src]

pub default fn to_string(&self) -> String[src]

Converts the given value to a String. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

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]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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]

Performs the conversion.