Trait gurobi::model::Attr [] [src]

pub trait Attr: Into<CString> {
    type Out;
    type Buf: Init + Into<Self::Out> + AsRawPtr<Self::RawGet>;
    type RawGet;
    type RawSet: From<Self::Out>;
    unsafe fn get_attr(model: *mut GRBmodel, attrname: c_str, value: Self::RawGet) -> c_int;
    unsafe fn set_attr(model: *mut GRBmodel, attrname: c_str, value: Self::RawSet) -> c_int;

    fn get(model: &Model, attr: Self) -> Result<Self::Out> { ... }
    fn set(model: &mut Model, attr: Self, value: Self::Out) -> Result<()> { ... }
}

provides function to query/set the value of scalar attribute.

Associated Types

type Out

type Buf: Init + Into<Self::Out> + AsRawPtr<Self::RawGet>

type RawGet

type RawSet: From<Self::Out>

Required Methods

unsafe fn get_attr(model: *mut GRBmodel, attrname: c_str, value: Self::RawGet) -> c_int

unsafe fn set_attr(model: *mut GRBmodel, attrname: c_str, value: Self::RawSet) -> c_int

Provided Methods

fn get(model: &Model, attr: Self) -> Result<Self::Out>

fn set(model: &mut Model, attr: Self, value: Self::Out) -> Result<()>

Implementors