pub struct NormalisedMacroBody(/* private fields */);Expand description
The body of a -define, normalised. An empty body is the token
%empty%, which cannot be an Erlang token sequence, so no text a
snapshot line holds reads as an absent body.
Implementations§
Source§impl NormalisedMacroBody
impl NormalisedMacroBody
pub fn from_source(source: &str) -> Self
pub fn from_stored(text: &str) -> Result<Self, NameError>
pub fn as_str(&self) -> &str
Sourcepub fn is_string_literal(&self) -> bool
pub fn is_string_literal(&self) -> bool
True when the body is only string literals, so it cannot change what a use of the macro compiles against.
Trait Implementations§
Source§impl Clone for NormalisedMacroBody
impl Clone for NormalisedMacroBody
Source§impl Debug for NormalisedMacroBody
impl Debug for NormalisedMacroBody
Source§impl<'de> Deserialize<'de> for NormalisedMacroBody
impl<'de> Deserialize<'de> for NormalisedMacroBody
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for NormalisedMacroBody
impl Display for NormalisedMacroBody
impl Eq for NormalisedMacroBody
Source§impl From<NormalisedMacroBody> for String
impl From<NormalisedMacroBody> for String
Source§fn from(body: NormalisedMacroBody) -> Self
fn from(body: NormalisedMacroBody) -> Self
Converts to this type from the input type.
Source§impl Hash for NormalisedMacroBody
impl Hash for NormalisedMacroBody
Source§impl Ord for NormalisedMacroBody
impl Ord for NormalisedMacroBody
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for NormalisedMacroBody
impl PartialEq for NormalisedMacroBody
Source§impl PartialOrd for NormalisedMacroBody
impl PartialOrd for NormalisedMacroBody
Source§impl Serialize for NormalisedMacroBody
impl Serialize for NormalisedMacroBody
impl StructuralPartialEq for NormalisedMacroBody
Auto Trait Implementations§
impl Forget for NormalisedMacroBody
impl Freeze for NormalisedMacroBody
impl Move for NormalisedMacroBody
impl RefUnwindSafe for NormalisedMacroBody
impl Send for NormalisedMacroBody
impl Sync for NormalisedMacroBody
impl Unpin for NormalisedMacroBody
impl UnsafeUnpin for NormalisedMacroBody
impl UnwindSafe for NormalisedMacroBody
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