pub struct Variable(pub Arc<PlainSymbol>);Tuple Fields§
§0: Arc<PlainSymbol>Implementations§
Source§impl Variable
impl Variable
pub fn as_str(&self) -> &str
pub fn name(&self) -> PlainSymbol
Sourcepub fn from_valid_name(name: &str) -> Variable
pub fn from_valid_name(name: &str) -> Variable
Return a new Variable, assuming that the provided string is a valid name.
Source§impl Variable
impl Variable
pub fn from_arc(sym: Arc<PlainSymbol>) -> Option<Variable>
Sourcepub fn from_symbol(sym: &PlainSymbol) -> Option<Variable>
pub fn from_symbol(sym: &PlainSymbol) -> Option<Variable>
TODO: intern strings. #398.
Trait Implementations§
impl Eq for Variable
Source§impl FromValue<Variable> for Variable
If the provided EDN value is a PlainSymbol beginning with ‘?’, return
it wrapped in a Variable. If not, return None.
TODO: intern strings. #398.
impl FromValue<Variable> for Variable
If the provided EDN value is a PlainSymbol beginning with ‘?’, return it wrapped in a Variable. If not, return None. TODO: intern strings. #398.
fn from_value(v: &ValueAndSpan) -> Option<Variable>
Source§impl Ord for Variable
impl Ord for Variable
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Variable
impl PartialOrd for Variable
impl StructuralPartialEq for Variable
Auto Trait Implementations§
impl Freeze for Variable
impl RefUnwindSafe for Variable
impl Send for Variable
impl Sync for Variable
impl Unpin for Variable
impl UnsafeUnpin for Variable
impl UnwindSafe for Variable
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more