Skip to main content

Open

Struct Open 

Source
pub struct Open {
    pub mode: OpenMode,
    pub format: Format,
    pub page: Option<Page>,
    pub assigned: Option<String>,
    /* private fields */
}

Fields§

§mode: OpenMode§format: Format§page: Option<Page>

The logical page of a LINAGE file opened OUTPUT or EXTEND.

§assigned: Option<String>

The DD a file whose ASSIGN names a data item was opened on.

Implementations§

Source§

impl Open

Source

pub fn keyed(&mut self) -> Option<&mut Keyed>

Source

pub fn is_keyed(&self) -> bool

Source

pub fn mark_open(&mut self, data_set: &Path) -> Result<()>

Marks the VSAM data set this file holds open for output until CLOSE (open_mark).

Source

pub fn read(&mut self, fixed_len: usize) -> Result<Record>

Source

pub fn write(&mut self, bytes: &[u8]) -> Result<()>

Source

pub fn print( &mut self, before: Option<Move>, line: &str, after: Option<Move>, ) -> Result<()>

Writes a line to a text DD where a printer would put it: after before, over a line not yet ended when nothing moved the paper (after a carriage return, unless one of the two is blank), then after. The first line of the DD takes one line of before as its own start, as a printer at the top of a form prints a single-spaced first line on line 1.

Source

pub fn close(self) -> Result<()>

Source

pub fn abandon(self) -> Result<()>

Ends the file as an abend that Language Environment is not told of leaves it: its records are written as CLOSE writes them, and a VSAM data set keeps its open mark (numeric::assumptions::TRAP_OFF_LEAVES_FILES_OPEN).

Auto Trait Implementations§

§

impl Freeze for Open

§

impl RefUnwindSafe for Open

§

impl Send for Open

§

impl Sync for Open

§

impl Unpin for Open

§

impl UnsafeUnpin for Open

§

impl UnwindSafe for Open

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.