pub struct AltiumDocument<R: Read + Seek> { /* private fields */ }Expand description
Unified entry point for working with Altium files.
Provides ergonomic access to any Altium file type through a common interface, with methods for accessing different abstraction layers.
Implementations§
Source§impl AltiumDocument<File>
impl AltiumDocument<File>
Source§impl<R: Read + Seek> AltiumDocument<R>
impl<R: Read + Seek> AltiumDocument<R>
Sourcepub fn from_reader(reader: R) -> Result<Self>
pub fn from_reader(reader: R) -> Result<Self>
Opens from a reader.
Sourcepub fn file_type(&self) -> AltiumFileType
pub fn file_type(&self) -> AltiumFileType
Returns the detected file type.
Sourcepub fn params(&mut self, stream_path: &str) -> Result<&ParamsContainer>
pub fn params(&mut self, stream_path: &str) -> Result<&ParamsContainer>
Gets records from a stream as a parameter container.
Loads and caches the container on first access.
Sourcepub fn params_mut(&mut self, stream_path: &str) -> Result<&mut ParamsContainer>
pub fn params_mut(&mut self, stream_path: &str) -> Result<&mut ParamsContainer>
Gets mutable records from a stream.
Sourcepub fn binary(&mut self, stream_path: &str) -> Result<&BinaryContainer>
pub fn binary(&mut self, stream_path: &str) -> Result<&BinaryContainer>
Gets binary records from a stream.
Sourcepub fn binary_mut(&mut self, stream_path: &str) -> Result<&mut BinaryContainer>
pub fn binary_mut(&mut self, stream_path: &str) -> Result<&mut BinaryContainer>
Gets mutable binary records from a stream.
Sourcepub fn component_names(&mut self) -> Result<Vec<String>>
pub fn component_names(&mut self) -> Result<Vec<String>>
For libraries: lists component/footprint names.
Sourcepub fn resolve_component(&mut self, name: &str) -> Result<String>
pub fn resolve_component(&mut self, name: &str) -> Result<String>
Resolves a component name to its storage path.
Sourcepub fn clear_cache(&mut self)
pub fn clear_cache(&mut self)
Clears all cached containers.
Auto Trait Implementations§
impl<R> Freeze for AltiumDocument<R>
impl<R> RefUnwindSafe for AltiumDocument<R>
impl<R> Send for AltiumDocument<R>
impl<R> Sync for AltiumDocument<R>
impl<R> Unpin for AltiumDocument<R>
impl<R> UnwindSafe for AltiumDocument<R>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more