pub struct Forceable<T> {
pub value: T,
pub forced: bool,
}
Expand description
Helper structure to encode forced values, a Fuchsia-specific extension to options.
Fields§
§value: T
§forced: bool
Implementations§
Source§impl Forceable<TftpOption>
impl Forceable<TftpOption>
Sourcepub fn serialized_len(&self) -> usize
pub fn serialized_len(&self) -> usize
Gets this options’s serialized length.
forced
controls whether the option will be forced. Forceable options have
an appended !
character which increases their length when serialized.
Trait Implementations§
Source§impl FromIterator<Forceable<TftpOption>> for AllOptions
impl FromIterator<Forceable<TftpOption>> for AllOptions
Constructs an AllOptions
from an iterator of Forceable<TftpOption>
.
If the same option appears more than once in the iterator, the later value is kept.
Source§fn from_iter<T: IntoIterator<Item = Forceable<TftpOption>>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = Forceable<TftpOption>>>(iter: T) -> Self
Creates a value from an iterator. Read more
Source§impl FromIterator<Forceable<TftpOption>> for OptionCollection
impl FromIterator<Forceable<TftpOption>> for OptionCollection
Source§fn from_iter<T: IntoIterator<Item = Forceable<TftpOption>>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = Forceable<TftpOption>>>(iter: T) -> Self
Creates a value from an iterator. Read more
impl<T: Eq> Eq for Forceable<T>
impl<T> StructuralPartialEq for Forceable<T>
Auto Trait Implementations§
impl<T> Freeze for Forceable<T>where
T: Freeze,
impl<T> RefUnwindSafe for Forceable<T>where
T: RefUnwindSafe,
impl<T> Send for Forceable<T>where
T: Send,
impl<T> Sync for Forceable<T>where
T: Sync,
impl<T> Unpin for Forceable<T>where
T: Unpin,
impl<T> UnwindSafe for Forceable<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)