pub struct HclEditLoader;Expand description
Default Loader implementation backed by hcl-edit::parser::parse_body.
Stateless and Send + Sync. Per the spec it’s pure w.r.t. external
state — given the same (dir, sources, limits), the output is byte-for-byte
identical (modulo Arc<str> identity).
Implementations§
Source§impl HclEditLoader
impl HclEditLoader
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Construct an HclEditLoader.
Sourcepub fn parse_bytes(
&self,
bytes: &[u8],
path: &Arc<Path>,
limits: &LoaderLimits,
) -> ParseBytesResult
pub fn parse_bytes( &self, bytes: &[u8], path: &Arc<Path>, limits: &LoaderLimits, ) -> ParseBytesResult
Convenience: parse a single byte slice into RawBlocks without
touching the filesystem. Used by the fuzz harness and by integration
tests that synthesise inputs in-memory.
Trait Implementations§
Source§impl Clone for HclEditLoader
impl Clone for HclEditLoader
Source§fn clone(&self) -> HclEditLoader
fn clone(&self) -> HclEditLoader
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HclEditLoader
impl Debug for HclEditLoader
Source§impl Default for HclEditLoader
impl Default for HclEditLoader
Source§fn default() -> HclEditLoader
fn default() -> HclEditLoader
Returns the “default value” for a type. Read more
Source§impl Loader for HclEditLoader
impl Loader for HclEditLoader
Source§fn load(
&self,
dir: &DiscoveredDir,
ctx: &LoadContext<'_>,
) -> Result<RawComponent>
fn load( &self, dir: &DiscoveredDir, ctx: &LoadContext<'_>, ) -> Result<RawComponent>
impl Copy for HclEditLoader
Auto Trait Implementations§
impl Freeze for HclEditLoader
impl RefUnwindSafe for HclEditLoader
impl Send for HclEditLoader
impl Sync for HclEditLoader
impl Unpin for HclEditLoader
impl UnsafeUnpin for HclEditLoader
impl UnwindSafe for HclEditLoader
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