Struct awint_macro_internals::Usbr
source · pub struct Usbr {
pub start: Option<Usb>,
pub end: Option<Usb>,
}
Fields§
§start: Option<Usb>
§end: Option<Usb>
Implementations§
source§impl Usbr
impl Usbr
A range encompassing self.start..self.end
pub fn unbounded() -> Self
pub fn new_static(start: i128, end: i128) -> Self
sourcepub fn simplify(&mut self) -> Result<(), String>
pub fn simplify(&mut self) -> Result<(), String>
Also tries to statically check if range is valid
sourcepub fn simplify_literal(&mut self, bits: &Bits) -> Result<(), String>
pub fn simplify_literal(&mut self, bits: &Bits) -> Result<(), String>
Attempt to simplify the range for literal components. Returns an error
if the function statically finds the range to be out of
bounds of bits
Assumes simplify
has already been called
sourcepub fn static_range(&self) -> Option<(i128, i128)>
pub fn static_range(&self) -> Option<(i128, i128)>
Returns if a static range was able to be determined
sourcepub fn static_width(&self) -> Option<i128>
pub fn static_width(&self) -> Option<i128>
Returns if a static width was able to be determined
sourcepub fn simplify_filler(&mut self) -> Result<(), String>
pub fn simplify_filler(&mut self) -> Result<(), String>
Returns an error if ranges are statically determined to be invalid
Trait Implementations§
source§impl PartialEq for Usbr
impl PartialEq for Usbr
impl Eq for Usbr
impl StructuralPartialEq for Usbr
Auto Trait Implementations§
impl RefUnwindSafe for Usbr
impl Send for Usbr
impl Sync for Usbr
impl Unpin for Usbr
impl UnwindSafe for Usbr
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