Struct linux_object::fs::Pipe
source · [−]pub struct Pipe { /* private fields */ }
Expand description
pipe struct
Implementations
Trait Implementations
sourceimpl INode for Pipe
impl INode for Pipe
sourcefn poll(&self) -> Result<PollStatus>
fn poll(&self) -> Result<PollStatus>
monitoring events and determine whether the pipe is readable or writeable if the write end is not close and the buffer is empty, the read end will be block
sourcefn as_any_ref(&self) -> &dyn Any
fn as_any_ref(&self) -> &dyn Any
return the any ref
sourcefn async_poll<'a>(
&'a self
) -> Pin<Box<dyn Future<Output = Result<PollStatus>> + Send + Sync + 'a>>
fn async_poll<'a>(
&'a self
) -> Pin<Box<dyn Future<Output = Result<PollStatus>> + Send + Sync + 'a>>
Poll the events, return a bitmap of events, async version.
fn set_metadata(&self, _metadata: &Metadata) -> Result<(), FsError>
fn set_metadata(&self, _metadata: &Metadata) -> Result<(), FsError>
Set metadata of the INode
fn create(
&self,
name: &str,
type_: FileType,
mode: u32
) -> Result<Arc<dyn INode + 'static>, FsError>
fn create(
&self,
name: &str,
type_: FileType,
mode: u32
) -> Result<Arc<dyn INode + 'static>, FsError>
Create a new INode in the directory
fn create2(
&self,
name: &str,
type_: FileType,
mode: u32,
_data: usize
) -> Result<Arc<dyn INode + 'static>, FsError>
fn create2(
&self,
name: &str,
type_: FileType,
mode: u32,
_data: usize
) -> Result<Arc<dyn INode + 'static>, FsError>
Create a new INode in the directory, with a data field for usages like device file.
fn link(
&self,
_name: &str,
_other: &Arc<dyn INode + 'static>
) -> Result<(), FsError>
fn link(
&self,
_name: &str,
_other: &Arc<dyn INode + 'static>
) -> Result<(), FsError>
Create a hard link name
to other
fn move_(
&self,
_old_name: &str,
_target: &Arc<dyn INode + 'static>,
_new_name: &str
) -> Result<(), FsError>
fn move_(
&self,
_old_name: &str,
_target: &Arc<dyn INode + 'static>,
_new_name: &str
) -> Result<(), FsError>
Move INode self/old_name
to target/new_name
.
If target
equals self
, do rename. Read more
fn find(&self, _name: &str) -> Result<Arc<dyn INode + 'static>, FsError>
fn find(&self, _name: &str) -> Result<Arc<dyn INode + 'static>, FsError>
Find the INode name
in the directory
fn get_entry_with_metadata(
&self,
id: usize
) -> Result<(Metadata, String), FsError>
fn get_entry_with_metadata(
&self,
id: usize
) -> Result<(Metadata, String), FsError>
Get the name of directory entry with metadata
fn fs(&self) -> Arc<dyn FileSystem + 'static>
fn fs(&self) -> Arc<dyn FileSystem + 'static>
Get the file system of the INode
Auto Trait Implementations
impl !RefUnwindSafe for Pipe
impl Send for Pipe
impl Sync for Pipe
impl Unpin for Pipe
impl !UnwindSafe for Pipe
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> CheckedAs for T
impl<T> CheckedAs for T
sourcefn checked_as<Dst>(self) -> Option<Dst> where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst> where
T: CheckedCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> CheckedCastFrom<Src> for Dst where
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dst where
Src: CheckedCast<Dst>,
sourcefn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
sourceimpl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
sourcefn into_result(self) -> Result<T, ZxError>
fn into_result(self) -> Result<T, ZxError>
Performs the conversion.
sourceimpl<T> OverflowingAs for T
impl<T> OverflowingAs for T
sourcefn overflowing_as<Dst>(self) -> (Dst, bool) where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool) where
T: OverflowingCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> OverflowingCastFrom<Src> for Dst where
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dst where
Src: OverflowingCast<Dst>,
sourcefn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
sourceimpl<T> SaturatingAs for T
impl<T> SaturatingAs for T
sourcefn saturating_as<Dst>(self) -> Dst where
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dst where
T: SaturatingCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> SaturatingCastFrom<Src> for Dst where
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dst where
Src: SaturatingCast<Dst>,
sourcefn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
sourceimpl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
sourcefn unwrapped_as<Dst>(self) -> Dst where
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dst where
T: UnwrappedCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> UnwrappedCastFrom<Src> for Dst where
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dst where
Src: UnwrappedCast<Dst>,
sourcefn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
sourceimpl<T> WrappingAs for T
impl<T> WrappingAs for T
sourcefn wrapping_as<Dst>(self) -> Dst where
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dst where
T: WrappingCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> WrappingCastFrom<Src> for Dst where
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dst where
Src: WrappingCast<Dst>,
sourcefn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.