[−][src]Struct raystack::Ref
A Haystack Ref.
Methods
impl Ref
[src]
pub fn new(s: String) -> Result<Self, ParseRefError>
[src]
Create a new Ref
.
Example
use raystack::Ref; let my_ref = Ref::new("@p:bigProject:r:24efe1c4-24aef280".to_string()).unwrap();
pub fn from_encoded_json_string(
json_string: &str
) -> Result<Self, ParseRefError>
[src]
json_string: &str
) -> Result<Self, ParseRefError>
Return a Ref by decoding a ref which was encoded in a JSON string. In
raw JSON strings, ref are formatted with a r:
prefix instead of
an @
sign.
Example
use raystack::Ref; let json_str = "r:p:bigProject:r:24efe1c4-24aef280"; let my_ref = Ref::from_encoded_json_string(json_str).unwrap();
pub fn to_encoded_json_string(&self) -> String
[src]
Return a string containing this ref, encoded with a r:
prefix instead
of with an @
sign. This representation for refs is used in raw
JSON strings sent to and from a Haystack server.
pub fn into_string(self) -> String
[src]
Convert this ref into a string.
pub fn to_axon_code(&self) -> &str
[src]
Return this ref as an Axon ref literal.
Trait Implementations
impl AsRef<str> for Ref
[src]
impl Eq for Ref
[src]
impl Clone for Ref
[src]
impl PartialEq<Ref> for Ref
[src]
impl Debug for Ref
[src]
impl FromStr for Ref
[src]
Auto Trait Implementations
impl Unpin for Ref
impl Sync for Ref
impl Send for Ref
impl UnwindSafe for Ref
impl RefUnwindSafe for Ref
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for 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.
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.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
fn vzip(self) -> V
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<T> Erased for T
impl<'a, T> TryFrom<&'a str> for T where
T: FromStr,
T: FromStr,
type Err = <T as FromStr>::Err
fn try_from(string: &'a str) -> Result<T, <T as TryFrom<&'a str>>::Err>
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,