pub struct Source { /* private fields */ }
Expand description
A policy file.
Implementations§
Source§impl Source
impl Source
pub fn from_contents(file: String, contents: String) -> Result<Source>
pub fn file(&self) -> &String
pub fn contents(&self) -> &String
pub fn line(&self, idx: u32) -> &str
pub fn message(&self, line: u32, col: u32, kind: &str, msg: &str) -> String
pub fn error(&self, line: u32, col: u32, msg: &str) -> Error
Trait Implementations§
Source§impl Ord for Source
impl Ord for Source
Source§impl PartialOrd for Source
impl PartialOrd for Source
impl Eq for Source
Auto Trait Implementations§
impl Freeze for Source
impl RefUnwindSafe for Source
impl Send for Source
impl Sync for Source
impl Unpin for Source
impl UnwindSafe for Source
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