ShepherdVersionTag

Struct ShepherdVersionTag 

Source
pub struct ShepherdVersionTag(/* private fields */);

Implementations§

Source§

impl ShepherdVersionTag

Source

pub const fn new() -> Self

Creates a new default initialized bitfield.

Source

pub const fn from_bits(bits: u64) -> Self

Convert from bits.

Source

pub const fn into_bits(self) -> u64

Convert into bits.

Source

pub const fn major(&self) -> u8

The version tag deployed

Units: major.minor.patch

Bits: 0..8

Source

pub const fn with_major_checked(self, value: u8) -> Result<Self, ()>

The version tag deployed

Units: major.minor.patch

Bits: 0..8

Source

pub const fn with_major(self, value: u8) -> Self

The version tag deployed

Units: major.minor.patch

Bits: 0..8

Source

pub const fn set_major(&mut self, value: u8)

The version tag deployed

Units: major.minor.patch

Bits: 0..8

Source

pub const fn set_major_checked(&mut self, value: u8) -> Result<(), ()>

The version tag deployed

Units: major.minor.patch

Bits: 0..8

Source

pub const fn minor(&self) -> u8

The version tag deployed

Units: major.minor.patch

Bits: 8..16

Source

pub const fn with_minor_checked(self, value: u8) -> Result<Self, ()>

The version tag deployed

Units: major.minor.patch

Bits: 8..16

Source

pub const fn with_minor(self, value: u8) -> Self

The version tag deployed

Units: major.minor.patch

Bits: 8..16

Source

pub const fn set_minor(&mut self, value: u8)

The version tag deployed

Units: major.minor.patch

Bits: 8..16

Source

pub const fn set_minor_checked(&mut self, value: u8) -> Result<(), ()>

The version tag deployed

Units: major.minor.patch

Bits: 8..16

Source

pub const fn patch(&self) -> u8

The version tag deployed

Units: major.minor.patch

Bits: 16..24

Source

pub const fn with_patch_checked(self, value: u8) -> Result<Self, ()>

The version tag deployed

Units: major.minor.patch

Bits: 16..24

Source

pub const fn with_patch(self, value: u8) -> Self

The version tag deployed

Units: major.minor.patch

Bits: 16..24

Source

pub const fn set_patch(&mut self, value: u8)

The version tag deployed

Units: major.minor.patch

Bits: 16..24

Source

pub const fn set_patch_checked(&mut self, value: u8) -> Result<(), ()>

The version tag deployed

Units: major.minor.patch

Bits: 16..24

Source

pub const fn dirty(&self) -> u8

Whether the working tree was dirty

Units: bool

Bits: 24..32

Source

pub const fn with_dirty_checked(self, value: u8) -> Result<Self, ()>

Whether the working tree was dirty

Units: bool

Bits: 24..32

Source

pub const fn with_dirty(self, value: u8) -> Self

Whether the working tree was dirty

Units: bool

Bits: 24..32

Source

pub const fn set_dirty(&mut self, value: u8)

Whether the working tree was dirty

Units: bool

Bits: 24..32

Source

pub const fn set_dirty_checked(&mut self, value: u8) -> Result<(), ()>

Whether the working tree was dirty

Units: bool

Bits: 24..32

Source

pub const fn local_commit(&self) -> u8

Whether local-only commits were deployed

Units: bool

Bits: 32..40

Source

pub const fn with_local_commit_checked(self, value: u8) -> Result<Self, ()>

Whether local-only commits were deployed

Units: bool

Bits: 32..40

Source

pub const fn with_local_commit(self, value: u8) -> Self

Whether local-only commits were deployed

Units: bool

Bits: 32..40

Source

pub const fn set_local_commit(&mut self, value: u8)

Whether local-only commits were deployed

Units: bool

Bits: 32..40

Source

pub const fn set_local_commit_checked(&mut self, value: u8) -> Result<(), ()>

Whether local-only commits were deployed

Units: bool

Bits: 32..40

Trait Implementations§

Source§

impl Clone for ShepherdVersionTag

Source§

fn clone(&self) -> ShepherdVersionTag

Returns a duplicate 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 ShepherdVersionTag

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for ShepherdVersionTag

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl From<ShepherdVersionTag> for u64

Source§

fn from(v: ShepherdVersionTag) -> Self

Converts to this type from the input type.
Source§

impl From<u64> for ShepherdVersionTag

Source§

fn from(v: u64) -> Self

Converts to this type from the input type.
Source§

impl ToCanFrame for ShepherdVersionTag

Source§

const LEN: usize = 5usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

fn to_can_frame<F: Frame>(self) -> F

Source§

impl Copy for ShepherdVersionTag

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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 = 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>,

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.