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

pub trait Attr: Into<CString> {
    type Output: Clone;
    type Init: Clone + Init + Into<Self::Output> + AsRawPtr<Self::RawGet>;
    type RawGet;
    type RawSet: From<Self::Output>;
    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::Output> { ... }
    fn set(model: &mut Model, attr: Self, value: Self::Output) -> Result<()> { ... }
}

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

Associated Types

type Output: Clone

type Init: Clone + Init + Into<Self::Output> + AsRawPtr<Self::RawGet>

type RawGet

type RawSet: From<Self::Output>

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::Output>

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

Implementors