pub struct FrameSet { /* private fields */ }
Expand description
A collection of Quil frames (DEFFRAME
instructions) with utility methods.
Implementations§
source§impl FrameSet
impl FrameSet
pub fn new() -> Self
sourcepub fn get(&self, identifier: &FrameIdentifier) -> Option<&FrameAttributes>
pub fn get(&self, identifier: &FrameIdentifier) -> Option<&FrameAttributes>
Retrieve the attributes of a frame by its identifier.
sourcepub fn get_keys(&self) -> Vec<&FrameIdentifier>
pub fn get_keys(&self) -> Vec<&FrameIdentifier>
Return a list of all frame IDs described by this FrameSet.
sourcepub fn insert(
&mut self,
identifier: FrameIdentifier,
attributes: FrameAttributes
)
pub fn insert( &mut self, identifier: FrameIdentifier, attributes: FrameAttributes )
Insert a new frame by ID, overwriting any existing one.
sourcepub fn merge(&mut self, other: FrameSet)
pub fn merge(&mut self, other: FrameSet)
Merge another FrameSet with this one, overwriting any existing keys
sourcepub fn intersection(&self, identifiers: &HashSet<&FrameIdentifier>) -> Self
pub fn intersection(&self, identifiers: &HashSet<&FrameIdentifier>) -> Self
Return a new FrameSet which describes only the given FrameIdentifiers.
sourcepub fn iter(&self) -> Iter<'_, FrameIdentifier, FrameAttributes>
pub fn iter(&self) -> Iter<'_, FrameIdentifier, FrameAttributes>
Iterate through the contained frames.
sourcepub fn into_instructions(self) -> Vec<Instruction>
pub fn into_instructions(self) -> Vec<Instruction>
Return the Quil instructions which describe the contained frames, consuming the FrameSet
.
sourcepub fn to_instructions(&self) -> Vec<Instruction>
pub fn to_instructions(&self) -> Vec<Instruction>
Return the Quil instructions which describe the contained frames.
Trait Implementations§
source§impl PartialEq<FrameSet> for FrameSet
impl PartialEq<FrameSet> for FrameSet
impl Eq for FrameSet
impl StructuralEq for FrameSet
impl StructuralPartialEq for FrameSet
Auto Trait Implementations§
impl RefUnwindSafe for FrameSet
impl Send for FrameSet
impl Sync for FrameSet
impl Unpin for FrameSet
impl UnwindSafe for FrameSet
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.