Trait LinkableClientSender

Source
pub trait LinkableClientSender {
    type Transport: Transport;

    // Required method
    fn link_into<___R>(
        &self,
        request: &mut ___R,
    ) -> Result<ResponseFuture<'_, Self::Transport, LinkInto>, EncodeError>
       where ___R: Encode<<Self::Transport as Transport>::SendBuffer, Encoded = WireLinkableLinkIntoRequest>;
}
Expand description

A helper trait for the Linkable client sender.

Required Associated Types§

Source

type Transport: Transport

Required Methods§

Creates a link to this this object with name dst in the directory represented by dst_parent_token.

dst must be a resolved object name. Including “/” in the string will return ZX_ERR_INVALID_ARGS.

This method requires the maximal set of rights supported by the filesystem for this object. For files this would typically be [Rights.READ_BYTES], [Rights.WRITE_BYTES], [Rights.GET_ATTRIBUTES] and [Rights.UPDATE_ATTRIBUTES]. Some filesystems might also support the [Rights.EXECUTE] right. Insufficient rights will result in ZX_ERR_ACCESS_DENIED.

If this object has no links and is NOT an unnamed temporary object (objects opened with Flags.FLAG_CREATE_AS_UNNAMED_TEMPORARY), it will fail with ZX_ERR_NOT_FOUND.

For unnamed temporary objects, use LinkInto to give it a name. Upon successful completion, the object will be permanently linked to the filesystem. Requires that the unnamed temporary object is linkable, if not, it will fail with ZX_ERR_NOT_FOUND.

This method does not have the same atomicity properties has the Directory::Link method, which means that calling Open then LinkInto is not equivalent to Directory::Link because LinkInto will not prevent the source from being renamed or unlinked.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<___T> LinkableClientSender for ClientSender<___T, Linkable>
where ___T: Transport,

Creates a link to this this object with name dst in the directory represented by dst_parent_token.

dst must be a resolved object name. Including “/” in the string will return ZX_ERR_INVALID_ARGS.

This method requires the maximal set of rights supported by the filesystem for this object. For files this would typically be [Rights.READ_BYTES], [Rights.WRITE_BYTES], [Rights.GET_ATTRIBUTES] and [Rights.UPDATE_ATTRIBUTES]. Some filesystems might also support the [Rights.EXECUTE] right. Insufficient rights will result in ZX_ERR_ACCESS_DENIED.

If this object has no links and is NOT an unnamed temporary object (objects opened with Flags.FLAG_CREATE_AS_UNNAMED_TEMPORARY), it will fail with ZX_ERR_NOT_FOUND.

For unnamed temporary objects, use LinkInto to give it a name. Upon successful completion, the object will be permanently linked to the filesystem. Requires that the unnamed temporary object is linkable, if not, it will fail with ZX_ERR_NOT_FOUND.

This method does not have the same atomicity properties has the Directory::Link method, which means that calling Open then LinkInto is not equivalent to Directory::Link because LinkInto will not prevent the source from being renamed or unlinked.

Source§

type Transport = ___T

Implementors§