pub struct AwlSource { /* private fields */ }Expand description
The authored AWL document an archive was built from, with the schema files it imports.
The document is text (an AWL document is UTF-8 by construction — the lexer
works on &str), so a consumer can parse it without re-validating an
encoding. Schema files stay bytes: they are staged back onto a filesystem
verbatim, and re-encoding them would change what the checker reads.
Implementations§
Source§impl AwlSource
impl AwlSource
Sourcepub fn new<I, N, B>(
document_name: impl Into<String>,
document: impl Into<String>,
schemas: I,
) -> Self
pub fn new<I, N, B>( document_name: impl Into<String>, document: impl Into<String>, schemas: I, ) -> Self
Creates an AWL provenance record from the document’s original filename, its source text, and its imported schema files keyed by document-relative path.
Names are validated when the archive is written, not here: an
unrepresentable name yields crate::PackageError::MalformedAwlEntry
from the write path, exactly as an unrepresentable module name does.
Sourcepub fn document_name(&self) -> &str
pub fn document_name(&self) -> &str
Returns the document’s original filename, extension included.
Trait Implementations§
impl Eq for AwlSource
impl StructuralPartialEq for AwlSource
Auto Trait Implementations§
impl Freeze for AwlSource
impl RefUnwindSafe for AwlSource
impl Send for AwlSource
impl Sync for AwlSource
impl Unpin for AwlSource
impl UnsafeUnpin for AwlSource
impl UnwindSafe for AwlSource
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.