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

Status flags for I2C transactions

The available status flags are BUSERR, ARBLOST, RXNACK, BUSSTATE, LOWTOUT and CLKHOLD, MEXTTOUT, SEXTTOUT and LENERR. The binary format of the underlying bits exactly matches the STATUS bits.

Implementations

Returns an instance with zero initialized data.

Returns the underlying bits.

Layout

The returned byte array is layed out in the same way as described here.

Converts the given bytes directly into the bitfield struct.

Returns the value of buserr.

Returns the value of buserr.

#Errors

If the returned value contains an invalid bit pattern for buserr.

Returns a copy of the bitfield with the value of buserr set to the given value.

#Panics

If the given value is out of bounds for buserr.

Returns a copy of the bitfield with the value of buserr set to the given value.

#Errors

If the given value is out of bounds for buserr.

Sets the value of buserr to the given value.

#Panics

If the given value is out of bounds for buserr.

Sets the value of buserr to the given value.

#Errors

If the given value is out of bounds for buserr.

Returns the value of arblost.

Returns the value of arblost.

#Errors

If the returned value contains an invalid bit pattern for arblost.

Returns a copy of the bitfield with the value of arblost set to the given value.

#Panics

If the given value is out of bounds for arblost.

Returns a copy of the bitfield with the value of arblost set to the given value.

#Errors

If the given value is out of bounds for arblost.

Sets the value of arblost to the given value.

#Panics

If the given value is out of bounds for arblost.

Sets the value of arblost to the given value.

#Errors

If the given value is out of bounds for arblost.

Returns the value of rxnack.

Returns the value of rxnack.

#Errors

If the returned value contains an invalid bit pattern for rxnack.

Returns the value of busstate.

Returns the value of busstate.

#Errors

If the returned value contains an invalid bit pattern for busstate.

Returns a copy of the bitfield with the value of busstate set to the given value.

#Panics

If the given value is out of bounds for busstate.

Returns a copy of the bitfield with the value of busstate set to the given value.

#Errors

If the given value is out of bounds for busstate.

Sets the value of busstate to the given value.

#Panics

If the given value is out of bounds for busstate.

Sets the value of busstate to the given value.

#Errors

If the given value is out of bounds for busstate.

Returns the value of lowtout.

Returns the value of lowtout.

#Errors

If the returned value contains an invalid bit pattern for lowtout.

Returns a copy of the bitfield with the value of lowtout set to the given value.

#Panics

If the given value is out of bounds for lowtout.

Returns a copy of the bitfield with the value of lowtout set to the given value.

#Errors

If the given value is out of bounds for lowtout.

Sets the value of lowtout to the given value.

#Panics

If the given value is out of bounds for lowtout.

Sets the value of lowtout to the given value.

#Errors

If the given value is out of bounds for lowtout.

Returns the value of clkhold.

Returns the value of clkhold.

#Errors

If the returned value contains an invalid bit pattern for clkhold.

Returns the value of mexttout.

Returns the value of mexttout.

#Errors

If the returned value contains an invalid bit pattern for mexttout.

Returns a copy of the bitfield with the value of mexttout set to the given value.

#Panics

If the given value is out of bounds for mexttout.

Returns a copy of the bitfield with the value of mexttout set to the given value.

#Errors

If the given value is out of bounds for mexttout.

Sets the value of mexttout to the given value.

#Panics

If the given value is out of bounds for mexttout.

Sets the value of mexttout to the given value.

#Errors

If the given value is out of bounds for mexttout.

Returns the value of sexttout.

Returns the value of sexttout.

#Errors

If the returned value contains an invalid bit pattern for sexttout.

Returns a copy of the bitfield with the value of sexttout set to the given value.

#Panics

If the given value is out of bounds for sexttout.

Returns a copy of the bitfield with the value of sexttout set to the given value.

#Errors

If the given value is out of bounds for sexttout.

Sets the value of sexttout to the given value.

#Panics

If the given value is out of bounds for sexttout.

Sets the value of sexttout to the given value.

#Errors

If the given value is out of bounds for sexttout.

Returns the value of lenerr.

Returns the value of lenerr.

#Errors

If the returned value contains an invalid bit pattern for lenerr.

Returns a copy of the bitfield with the value of lenerr set to the given value.

#Panics

If the given value is out of bounds for lenerr.

Returns a copy of the bitfield with the value of lenerr set to the given value.

#Errors

If the given value is out of bounds for lenerr.

Sets the value of lenerr to the given value.

#Panics

If the given value is out of bounds for lenerr.

Sets the value of lenerr to the given value.

#Errors

If the given value is out of bounds for lenerr.

Trait Implementations

Converts to this type from the input type.

Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.