pub struct Directive(/* private fields */);Expand description
A YAML directive like %YAML 1.2
Note: This type uses interior mutability through the rowan library.
Mutation methods work even when called through &self. See the crate-level
documentation for details on the mutability model.
Implementations§
Source§impl Directive
impl Directive
Sourcepub fn is_yaml_version(&self) -> bool
pub fn is_yaml_version(&self) -> bool
Check if this is a YAML version directive
Sourcepub fn new_yaml_version(version: &str) -> Self
pub fn new_yaml_version(version: &str) -> Self
Create a new YAML version directive
Trait Implementations§
impl Eq for Directive
impl StructuralPartialEq for Directive
Auto Trait Implementations§
impl Freeze for Directive
impl !RefUnwindSafe for Directive
impl !Send for Directive
impl !Sync for Directive
impl Unpin for Directive
impl UnsafeUnpin for Directive
impl !UnwindSafe for Directive
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