pub enum SockOptValue {
Value(Vec<u8>),
User(UserBuffer),
}Variants§
Value(Vec<u8>)
User(UserBuffer)
Implementations§
Source§impl SockOptValue
impl SockOptValue
pub fn len(&self) -> usize
pub fn read<T: FromBytes>(&self, current_task: &CurrentTask) -> Result<T, Errno>
pub fn read_bytes( &self, current_task: &CurrentTask, max_bytes: usize, ) -> Result<Vec<u8>, Errno>
pub fn to_vec(self, current_task: &CurrentTask) -> Result<Vec<u8>, Errno>
Trait Implementations§
Source§impl Debug for SockOptValue
impl Debug for SockOptValue
Source§impl From<UserBuffer> for SockOptValue
impl From<UserBuffer> for SockOptValue
Source§fn from(buffer: UserBuffer) -> Self
fn from(buffer: UserBuffer) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SockOptValue
impl RefUnwindSafe for SockOptValue
impl Send for SockOptValue
impl Sync for SockOptValue
impl Unpin for SockOptValue
impl UnwindSafe for SockOptValue
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, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
Converts the given service transport handle of type
T to [Self]Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T, U> MultiArchFrom<T> for Uwhere
U: From<T>,
impl<T, U> MultiArchFrom<T> for Uwhere
U: From<T>,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T, U> TryIntoExt<U> for Twhere
U: TryFromExt<T>,
impl<T, U> TryIntoExt<U> for Twhere
U: TryFromExt<T>,
type Error = <U as TryFromExt<T>>::Error
§fn try_into_ext(self) -> Result<U, <T as TryIntoExt<U>>::Error>
fn try_into_ext(self) -> Result<U, <T as TryIntoExt<U>>::Error>
Tries to perform the conversion.