pub struct DatasetsClient { /* private fields */ }
Expand description

§DatasetsClient

A sub-client for organizing the dataset functionality of the z/OSMF Rest APIs.

This client is intended to be accessed via the datasets attribute of the ZOsmf struct:

let _: DatasetsClient = zosmf.datasets();

Implementations§

source§

impl DatasetsClient

source

pub fn create(&self, dataset_name: &str) -> CreateDatasetBuilder<CreateDataset>

§Examples

Creating a sequential dataset:

let create_dataset = zosmf
    .datasets()
    .create("JIAHJ.REST.TEST.NEWDS")
    .volume("zmf046")
    .device_type("3390")
    .organization("PS")
    .space_allocation_unit("TRK")
    .primary_space(10)
    .secondary_space(5)
    .average_block_size(500)
    .record_format("FB")
    .block_size(400)
    .record_length(80)
    .build()
    .await?;

Creating a partitioned dataset (PDS):

let create_pds = zosmf
    .datasets()
    .create("JIAHJ.REST.TEST.NEWDS02")
    .volume("zmf046")
    .device_type("3390")
    .organization("PO")
    .space_allocation_unit("TRK")
    .primary_space(10)
    .secondary_space(5)
    .directory_blocks(10)
    .average_block_size(500)
    .record_format("FB")
    .block_size(400)
    .record_length(80)
    .build()
    .await?;

Creating a library / partitioned dataset extended (PDS-E):

let create_pdse = zosmf
    .datasets()
    .create("JIAHJ.REST.TEST.NEWDS02")
    .volume("zmf046")
    .device_type("3390")
    .organization("PO")
    .space_allocation_unit("TRK")
    .primary_space(10)
    .secondary_space(5)
    .directory_blocks(10)
    .average_block_size(500)
    .record_format("FB")
    .block_size(400)
    .record_length(80)
    .dataset_type("LIBRARY")
    .build()
    .await?;
source

pub fn delete(&self, dataset_name: &str) -> DeleteDatasetBuilder<DeleteDataset>

§Examples

Deleting a sequential dataset:

let delete_dataset = zosmf
    .datasets()
    .delete("JIAHJ.REST.TEST.DATASET")
    .build()
    .await?;

Deleting an uncataloged sequential dataset:

let delete_uncataloged = zosmf
    .datasets()
    .delete("JIAHJ.REST.TEST.DATASET2")
    .volume("ZMF046")
    .build()
    .await?;

Deleting a PDS member:

let delete_member = zosmf
    .datasets()
    .delete("JIAHJ.REST.TEST.PDS")
    .member("MEMBER01")
    .build()
    .await?;

Deleting an uncataloged PDS member:

let delete_uncataloged_member = zosmf
    .datasets()
    .delete("JIAHJ.REST.TEST.PDS.UNCAT")
    .member("MEMBER01")
    .volume("ZMF046")
    .build()
    .await?;
source

pub fn list( &self, name_pattern: &str ) -> ListDatasetsBuilder<ListDatasets<DatasetName>>

§Examples

Listing datasets:

let list_datasets = zosmf
    .datasets()
    .list("IBMUSER.CONFIG.*")
    .build()
    .await?;

Listing the base attributes of uncataloged datasets:

let list_datasets_base = zosmf
    .datasets()
    .list("**")
    .volume("PEVTS2")
    .attributes_base()
    .build()
    .await?;
source

pub fn list_members( &self, dataset_name: &str ) -> ListMembersBuilder<ListMembers<MemberName>>

§Examples

Listing PDS members:

let list_members = zosmf
    .datasets()
    .list_members("SYS1.PROCLIB")
    .build()
    .await?;

Listing the base attributes of PDS members:

let list_members_base = zosmf
    .datasets()
    .list_members("SYS1.PROCLIB")
    .attributes_base()
    .build()
    .await?;
source

pub fn read( &self, dataset_name: &str ) -> ReadDatasetBuilder<ReadDataset<Box<str>>>

§Examples

Reading a PDS member:

let read_member = zosmf
    .datasets()
    .read("SYS1.PARMLIB")
    .member("SMFPRM00")
    .build()
    .await?;

Reading a sequential dataset:

let read_dataset = zosmf
    .datasets()
    .read("JIAHJ.REST.SRVMP")
    .build()
    .await?;
source

pub fn write(&self, dataset_name: &str) -> WriteDatasetBuilder<WriteDataset>

§Examples

Writing to a PDS member:

let write_dataset = zosmf
    .datasets()
    .write("SYS1.PARMLIB")
    .member("SMFPRM00")
    .if_match("B5C6454F783590AA8EC15BD88E29EA63")
    .text(string_data)
    .build()
    .await?;

Trait Implementations§

source§

impl Clone for DatasetsClient

source§

fn clone(&self) -> DatasetsClient

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DatasetsClient

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more