[][src]Struct loa::assembly::Section

pub struct Section {
    pub leading_comment: Option<String>,
    pub label: Option<String>,
    pub instructions: Vec<Instruction>,
}

Fields

leading_comment: Option<String>label: Option<String>instructions: Vec<Instruction>

Methods

impl Section[src]

pub fn named<S: Into<String>>(label: S) -> Section[src]

pub fn unnamed() -> Section[src]

pub fn is_empty(&self) -> bool[src]

pub fn with_comment<S: Into<String>>(self, comment: S) -> Self[src]

pub fn add_instruction(&mut self, instruction: InstructionKind)[src]

pub fn with_instruction(self, instruction: InstructionKind) -> Self[src]

pub fn with_commented_instruction<S: Into<String>>(
    self,
    comment: S,
    instruction: InstructionKind
) -> Self
[src]

Trait Implementations

impl Clone for Section[src]

impl PartialEq<Section> for Section[src]

Auto Trait Implementations

impl RefUnwindSafe for Section

impl Send for Section

impl Sync for Section

impl Unpin for Section

impl UnwindSafe for Section

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.