pub struct Extensions { /* private fields */ }Expand description
Collection of RISC-V extensions.
Implementations§
Source§impl Extensions
impl Extensions
Sourcepub fn extensions(&self) -> Vec<Extension>
pub fn extensions(&self) -> Vec<Extension>
Returns a vector with the list of extensions. Extensions are sorted in canonical order.
The canonical order is defined as follows:
- Base ISA (I or E)
- Standard non-base extensions (M, A, F, D, Q, C, B, P, V, H)
- Standard Z-type extensions (e.g., Zicsr)
- Standard S-type extensions (e.g., Ssccfg)
- Vendor X-type extensions (e.g., XSifivecdiscarddlone)
Z, S, and X-type extensions are sorted by their string representation.
Sourcepub fn base_extension(&self) -> Option<Extension>
pub fn base_extension(&self) -> Option<Extension>
Returns the base extension (I or E) if present.
Sourcepub fn contains(&self, extension: &Extension) -> bool
pub fn contains(&self, extension: &Extension) -> bool
Returns true if the collection contains the given extension.
pub fn is_g(&self) -> bool
Trait Implementations§
Source§impl Clone for Extensions
impl Clone for Extensions
Source§fn clone(&self) -> Extensions
fn clone(&self) -> Extensions
Returns a duplicate of the value. Read more
1.0.0 · 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 Extensions
impl Debug for Extensions
Source§impl Display for Extensions
impl Display for Extensions
Source§impl PartialEq for Extensions
impl PartialEq for Extensions
Source§impl<'a> TryFrom<&'a str> for Extensions
impl<'a> TryFrom<&'a str> for Extensions
impl Eq for Extensions
impl StructuralPartialEq for Extensions
Auto Trait Implementations§
impl Freeze for Extensions
impl RefUnwindSafe for Extensions
impl Send for Extensions
impl Sync for Extensions
impl Unpin for Extensions
impl UnwindSafe for Extensions
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